Lab 4.3: (3) Cấu hình IP trên Interface của Switch Layer 3

By , 38 View


Truy cập vào "Lab 4-3 - Cau hinh IP tren Interface cua Switch Layer 3 v1" tại Public Unetlab Server 24/7 để thực hành.

Cấu hình địa chỉ IP trên các cổng giao tiếp của Switch Layer như thể hiện trên sơ đồ mạng.
- Cấu hình địa chỉ IP trên các cổng giao tiếp Interface.
Switch>enable
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#interface e0/3
Switch(config-if)#no switchport
*Feb  1 12:02:05.806: %LINK-3-UPDOWN: Interface Ethernet0/3, changed state to up
*Feb  1 12:02:06.810: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/3, changed state to up
Switch(config-if)#ip address 172.16.1.254 255.255.255.0
Switch(config-if)#exit       
Switch(config)#interface e0/0
Switch(config-if)#no switchport 
*Feb  1 12:02:28.283: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Feb  1 12:02:29.287: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
Switch(config-if)#ip address 172.16.2.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#interface e0/1
Switch(config-if)#no switchport
*Feb  1 12:02:46.838: %LINK-3-UPDOWN: Interface Ethernet0/1, changed state to up
*Feb  1 12:02:47.842: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/1, changed state to up
Switch(config-if)#ip address 172.16.10.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#interface e0/2
Switch(config-if)#no switchport
*Feb  1 12:03:01.934: %LINK-3-UPDOWN: Interface Ethernet0/2, changed state to up
*Feb  1 12:03:02.938: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/2, changed state to up
Switch(config-if)#ip address 172.16.20.254 255.255.255.0
Switch(config-if)#exit
Switch(config)#

- Kích hoạt chức năng định tuyến trên Switch Layer 3.
Switch#show ip route
Default gateway is not set

Host               Gateway           Last Use    Total Uses  Interface
ICMP redirect cache is empty
Switch#

Switch(config)#ip routing
Switch(config)#end
Switch#show ip route
*Feb  1 12:07:58.572: %SYS-5-CONFIG_I: Configured from console by console
Switch#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 8 subnets, 2 masks
C        172.16.1.0/24 is directly connected, Ethernet0/3
L        172.16.1.254/32 is directly connected, Ethernet0/3
C        172.16.2.0/24 is directly connected, Ethernet0/0
L        172.16.2.254/32 is directly connected, Ethernet0/0
C        172.16.10.0/24 is directly connected, Ethernet0/1
L        172.16.10.254/32 is directly connected, Ethernet0/1
C        172.16.20.0/24 is directly connected, Ethernet0/2
L        172.16.20.254/32 is directly connected, Ethernet0/2
Switch#

- Cấu hình định tuyến trên R1.
R1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip route 172.16.1.0 255.255.255.0 172.16.2.254
R1(config)#ip route 172.16.10.0 255.255.255.0 172.16.2.254
R1(config)#ip route 172.16.20.0 255.255.255.0 172.16.2.254
R1(config)#end
 
R1#show ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 192.168.100.1 to network 0.0.0.0

S*    0.0.0.0/0 [254/0] via 192.168.100.1
      172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
S        172.16.1.0/24 [1/0] via 172.16.2.254
S        172.16.10.0/24 [1/0] via 172.16.2.254
S        172.16.20.0/24 [1/0] via 172.16.2.254
R1#

- Cấu hình định tuyến trên Switch Layer 3.
Switch#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.1
Switch(config)#end
 
Switch#show ip route static
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is 172.16.2.1 to network 0.0.0.0

S*    0.0.0.0/0 [1/0] via 172.16.2.1
Switch#

Tham khảo các videos lý thuyết Hướng dẫn thực hành CCNA R&S để biết thêm thông tin chi tiết. 

You Might Also Like

0 comments