Route interface:
1. routerable physical interface --
Switch# conf t Switch(config)#int fa0/1 Switch(config-if)# no switchport> Switch(config-if)# ip address 10.3.1.1 255.255.0.0 Switch(config-if)#end
|
If you need to run the global commands of a route protocol ip routing, you must also enter the commands you entered When configuring the routing protocol on the router, for example, router ospf 64; net 10.0.0.0 0.0.0.255 area 0 ......
2. vswitchable interfaces --
To assign an IP address to two L2 interfaces, you need an independent interface to act as the routing interface. This is the concept of SVI. SVI uses interfaces such as interface vlan1 or interface vlan2. Then these two exchange interfaces are integrated into the same layer-3 interface, and then you can assign them the desired layer-3 addresses, such as IP addresses. It is easy to create a SVI. Just enter the "interface vlan #" command.
Switch# conf t Switch(config)#int vlan 1 Switch(config-if)#ip address 10.1.1.1 255.255.0.0 Switch(config)#int vlan 2 Switch(config-if)#ip address 10.2.1.1 255.255.0.0 Switch(config-if)#end |
Once you configure IP addresses for vlan interfaces or physical interfaces, you can configure routing protocols for them as usual and add them to the routing information.
Exchange Interface:
1 access port --
When you need to put several interfaces on the same IP subnet, You need to convert the interfaces from the routing interface to the switching interface. In config-if mode, use the switchport command to activate this purpose. Note: An access port can belong to only one VLAN, And the access interface automatically belongs to VLAN 1 by default.
Switch# conf t Switch(config)#int fa0/1 Switch(config-if)# switchport access vlan 1 Switch(config)#int fa0/2 Switch(config-if)# switchport access vlan 1 Switch(config-if)#end Switch# |
Next we will allocate the two interfaces to VLAN2. At this time, you will not be able to assign them a separate IP address, because they are layer-2 interfaces.
Switch# conf t Switch(config)#int fa0/1 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config)#int fa0/2 Switch(config-if)# switchport mode access Switch(config-if)# switchport access vlan 2 Switch(config-if)#end
|
The last step is to use the range Command to quickly drag a bunch of interfaces into a VLAN.
Switch(config)#int range fa0/5 - 9 Switch(config-if-range)#switchport access vlan 15 Switch(config-if-range)# |
2. Tunnel (Trunk) port --
You can create a tunnel interface and use ISL or 802.1q encapsulation to transmit information of multiple VLANs through the tunnel interface:
Switch# conf t Switch(config)#int fa0/1 Switch(config-if)# switchport Switch(config-if)# switchport trunk encapsulation isl Switch(config-if)# switchport trunk allowed vlan remove 11-900 Switch(config-if)#end |
- Cisco Catalyst 3550-24 and 3550-48 smart Ethernet Switches
- Catalyst 3550 series switches