Ethernet interface as layer 2 or layer 3 can create logical link. Ethernet interface layer 3 use subinterface as logical link. Here example the configuration :
Router R with step configure
R#sh run int f0/0
interface FastEthernet0/0
no ip address
duplex auto
speed auto
end
R(config)#int f0/0.1
R(config-subif)#ip address 10.10.10.1 255.255.255.252
% Configuring IP routing on a LAN subinterface is only allowed if that
subinterface is already configured as part of an IEEE 802.10, IEEE 802.1Q,
or ISL vLAN.
R(config-subif)#encapsulation ?
dot1Q IEEE 802.1Q Virtual LAN
isl Inter Switch Link - Virtual LAN encapsulation
R(config-subif)#encapsulation dot1Q ?
<1-4094> IEEE 802.1Q VLAN ID
R(config-subif)#encapsulation dot1Q 10
R(config-subif)#ip address 10.10.10.1 255.255.255.252
R#sh run int f0/0.1
interface FastEthernet0/0.1
encapsulation dot1Q 10
ip address 10.10.10.1 255.255.255.252
no snmp trap link-status
end
R#sh run int f0/0.2
interface FastEthernet0/0.2
encapsulation dot1Q 20
ip address 10.10.20.1 255.255.255.252
no snmp trap link-status
end
Router R2 and verify
R2#sh run int f0/0
interface FastEthernet0/0
no ip address
duplex auto
speed auto
end
R2#sh run int f0/0.1
interface FastEthernet0/0.1
encapsulation dot1Q 10
ip address 10.10.10.2 255.255.255.252
end
R2#sh run int f0/0.20
interface FastEthernet0/0.20
encapsulation dot1Q 20
ip address 10.10.20.2 255.255.255.252
end
R2#ping 10.10.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/28/44 ms
R2#ping 10.10.20.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.20.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/36/52 ms
No comments:
Post a Comment