cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1597
Views
0
Helpful
5
Replies

Question about router-on-a-stick....Thanks

cmcm88992
Level 1
Level 1

At Router Privileged mode , those following commands:

 

config t

int f0/0

no ip address

no shutdown

int f0/0.1

encapsulation dot1q 1

ip address 10.0.0.1 255.0.0.0

int f0/0.2

encapsulation dot1q 2

ip address 172.16.0.1 255.255.0.0

end

 

i find it in a book...

may i ask....why i have to go interface f0/0 and type "no ip address"?

i tried if i give f0/0 a ip address (e.g 192.168.1.1) ,router on a stick work also

what is the difference about "no ip address" for interface f0/0?

 

sorry for my poor english :( thanks

5 Replies 5

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The Author of this posting offers the information contained within this posting without consideration and with the reader's understanding that there's no implied or expressed suitability or fitness for any purpose. Information provided is for informational purposes only and should not be construed as rendering professional advice of any kind. Usage of this posting's information is solely at reader's own risk.

Liability Disclaimer

In no event shall Author be liable for any damages whatsoever (including, without limitation, damages for loss of use, data or profit) arising out of   the use or inability to use the posting's information even if Author has been advised of the possibility of such damage.

Posting

Unsure why the book describes what you note - might have to do with book's context.

The base interface can have, or not, an IP while still having the subinterfaces.  If it has an IP it would generate/process untagged frames.

Hi,

 

Only "no shutdown" is needed for fa0/0 configuration. 

"no ip address" is used for assurance of deleting any preconfigured or dynamically learned ip addresses(not necessary).

You can configure ip address on physical interface. but consider that it must belong to native vlan for proper operation.

 

HTH

In a switch trunk most of the vlans are sent with tagged frames and only a single vlan (referred to as the native vlan) sends frames that are not tagged. By default vlan 1 in the trunk is the native vlan. In the original post we are given a configuration to connect a router interface to a switch trunk which has two vlans, vlan 1 and vlan 2.

int f0/0

no ip address

no shutdown

int f0/0.1

encapsulation dot1q 1

int f0/0.2

encapsulation dot1q 2

Vlan 1 could be configured to be processed on a subinterface as this configuration does (and it is more common this way) but vlan 1 could also be configured to be processed on the physical interface. An IP address on the physical interface would indicate that the native vlan was configured on the physical interface.

 

As others have pointed out the "no ip address" on the physical interface is not required and the configuration would probably work just as well if it were not there. But it is a good idea (good ideas are sometimes not required) to put it into the configuration. Having it there prevents the possibility that the physical interface and the subinterface could both have IP addresses configured.

 

HTH

 

Rick

HTH

Rick

John Blakley
VIP Alumni
VIP Alumni

The physical interface (f0/0) will always send traffic untagged. There is no difference between:

int f0/0

ip address 10.0.0.1 255.0.0.0

OR

int f0/0.1

encapsulation dot1q 1

ip address 10.0.0.1 255.0.0.0

 

Now, I'd like to point out something which is probably just missing from the config. The config that you posted would actually tag vlan 1. The untagged command would be "encapsulation dot1q 1 native". As Rick said, there are a lot of people who don't use addresses on the physical interface, and instead, they break their interfaces down to subinterfaces and then tag their traffic for vlans.

Interestingly, my router image automatically defaults to native if I configure vlan 1:

R1(config-subif)#encapsulation dot1q 1
R1(config-subif)#do sh run int fa0/0.1
Building configuration...

Current configuration : 65 bytes
!
interface FastEthernet0/0.1
 encapsulation dot1Q 1 native
end

 

If I do any other vlan number, it doesn't automatically configure native.

HTH,

John
 

HTH, John *** Please rate all useful posts ***

I like and agree with most of what John says. But I do not agree about this configuration tagging the frames in vlan 1.  In truth we would not know for sure which vlan was native unless we are able to see the configuration of the switch port with the trunk. But if we assume default behaviors then by default vlan 1 is the native vlan and its frames will be transmitted untagged. And this configuration would not necessarily change that

int f0/0.1

encapsulation dot1q 1

 

It is interesting that some versions of router IOS will automatically include the native parameter on vlan 1. But just because this version of IOS does not include the parameter does not necessarily mean that it will tag frames in vlan 1.

 

HTH

 

Rick

 

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: