cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4549
Views
0
Helpful
2
Replies

Router Vlan configuration

How to configure Vlan in Router and how to allow two port in one vlan in router

 

suppose

Ihave create vlan 1 interface ip 172.141.0.1/16

Ihow i will give access fa0/0/and fa0/1 port to vlan 1

 

2 Accepted Solutions

Accepted Solutions

Rich Uline
Level 1
Level 1

Muarip6,

 

You have a few options to propagate a VLAN, but it depends on your specific hardware. What specific router and modules are you working with?

 

If the ports on your router support the switchport command, then assigning fa0/0 and fa0/1 to the appropriate VLAN is as easy as the following. Keep in mind that all switchports are by default assigned to VLAN 1, so that line will not show in the interface config.

Router#conf t
Router(config)#int fa0/0
Router(config-if)#switchport
Router(config-if)#switchport mode access
Router(config-if)#switchport access vlan 1

If that doesn't work, then you could try using bridging instead of VLANs. You would need to create a BVI instead of your SVI, and then assign the relevant interfaces to that bridge group.

Router#conf t
Router(config)#bridge irb
Router(config)#bridge 1 prot ieee
Router(config)#bridge 1 route ip
Router(config)#int BVI 1
Router(config-if)#ip add 172.141.0.1 255.255.0.0
Router(config-if)#int fa0/0
Router(config-if)#bridge-group 1

Sometimes you have interfaces that can only accept bridging and interfaces that can only accept VLANs, but you want them on the same subnet. In that case, you may need to combine the two.

Router#conf t
Router(config)#bridge irb
Router(config)#bridge 1 prot ieee
Router(config)#bridge 1 route ip
Router(config)#int VLAN 1
Router(config-if)#bridge-group 1
Router(config-if)#int fa0/0
Router(config-if)#switchport
Router(config-if)#switchport mode access
Router(config-if)#switchport access vlan 1
Router(config-if)#int ATM1/0.0
Router(config-if)#bridge-group 1

 

View solution in original post

Reza Sharifi
Hall of Fame
Hall of Fame

If you are using a switch, you simply add interfaces fa0/0 and fa0/1 to vlan 1.  If you are trying to do this on a router, you need to use IRB.  See link for config and look under "IRB sample configuration" section:

https://www.cisco.com/c/en/us/support/docs/lan-switching/integrated-routing-bridging-irb/17054-741-10.html

HTH

View solution in original post

2 Replies 2

Rich Uline
Level 1
Level 1

Muarip6,

 

You have a few options to propagate a VLAN, but it depends on your specific hardware. What specific router and modules are you working with?

 

If the ports on your router support the switchport command, then assigning fa0/0 and fa0/1 to the appropriate VLAN is as easy as the following. Keep in mind that all switchports are by default assigned to VLAN 1, so that line will not show in the interface config.

Router#conf t
Router(config)#int fa0/0
Router(config-if)#switchport
Router(config-if)#switchport mode access
Router(config-if)#switchport access vlan 1

If that doesn't work, then you could try using bridging instead of VLANs. You would need to create a BVI instead of your SVI, and then assign the relevant interfaces to that bridge group.

Router#conf t
Router(config)#bridge irb
Router(config)#bridge 1 prot ieee
Router(config)#bridge 1 route ip
Router(config)#int BVI 1
Router(config-if)#ip add 172.141.0.1 255.255.0.0
Router(config-if)#int fa0/0
Router(config-if)#bridge-group 1

Sometimes you have interfaces that can only accept bridging and interfaces that can only accept VLANs, but you want them on the same subnet. In that case, you may need to combine the two.

Router#conf t
Router(config)#bridge irb
Router(config)#bridge 1 prot ieee
Router(config)#bridge 1 route ip
Router(config)#int VLAN 1
Router(config-if)#bridge-group 1
Router(config-if)#int fa0/0
Router(config-if)#switchport
Router(config-if)#switchport mode access
Router(config-if)#switchport access vlan 1
Router(config-if)#int ATM1/0.0
Router(config-if)#bridge-group 1

 

Reza Sharifi
Hall of Fame
Hall of Fame

If you are using a switch, you simply add interfaces fa0/0 and fa0/1 to vlan 1.  If you are trying to do this on a router, you need to use IRB.  See link for config and look under "IRB sample configuration" section:

https://www.cisco.com/c/en/us/support/docs/lan-switching/integrated-routing-bridging-irb/17054-741-10.html

HTH

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:

Review Cisco Networking products for a $25 gift card