11-22-2017 09:42 AM - edited 03-08-2019 12:50 PM
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
Solved! Go to Solution.
11-22-2017 12:07 PM
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
11-22-2017 07:44 PM
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:
HTH
11-22-2017 12:07 PM
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
11-22-2017 07:44 PM
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:
HTH
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: