20201111 期中週
Last updated
Last updated
Static Routing
int e0/0
ip add 12.1.1.1 255.255.255.0
no shut
int e0/1
ip add 45.1.1.1 255.255.255.0
no shut
int e0/2
ip add 192.168.1.1 255.255.255.0
no shut
exit
ip route 192.168.2.0 255.255.255.0 e0/0 12.1.1.2
ip route 192.168.2.0 255.255.255.0 e0/1 45.1.1.3 10
int e0/0
ip add 12.1.1.2 255.255.255.0
no shut
int e0/1
ip add 23.1.1.2 255.255.255.0
no shut
int e0/2
ip add 192.168.2.1 255.255.255.0
no shut
exit
ip route 192.168.1.0 255.255.255.0 e0/0 12.1.1.1 10
ip route 192.168.1.0 255.255.255.0 e0/1 23.1.1.4
int e0/0
ip add 34.1.1.3 255.255.255.0
no shut
int e0/1
ip add 45.1.1.3 255.255.255.0
no shut
exit
ip route 192.168.1.0 255.255.255.0 e0/1 45.1.1.1
int e0/0
ip add 34.1.1.4 255.255.255.0
no shut
int e0/1
ip add 23.1.1.4 255.255.255.0
no shut
exit
ip route 192.168.1.0 255.255.255.0 e0/0 34.1.1.3
ip 192.168.1.2 255.255.0.0
ping 192.168.2.2
ip 192.168.2.2 255.255.0.0
ping 192.168.1.2
H1-->H2
H2-->H1
讓 h1、h2 透過 DHCP Server取得 IP 和相關資訊,h1 可 Ping h2
int e0/0
ip addr 12.1.1.1 255.255.255.0
no shut
int e0/1
ip addr 192.168.1.1 255.255.255.0
no shut
exit
ip dhcp pool DHCP
network 192.168.1.0 /24
default-router 192.168.1.1
dns-server 8.8.8.8
int e0/0
ip addr 12.1.1.2 255.255.255.0
no shut
int e0/1
ip addr 192.168.2.1 255.255.255.0
no shut
exit
ip dhcp pool DHCP2
network 192.168.2.0 /24
default-router 192.168.2.1
dns-server 8.8.8.8
ip dhcp
ping 192.168.2.2
ip dhcp
ping 192.168.1.2
分別使用 RIP 和 EIGRP 讓 192.168.1.1 可 Ping 192.168.2.1
RIP
int e0/0
ip add 12.1.1.1 255.255.255.0
no shut
int lo 0
ip add 192.168.1.1 255.255.255.0
no shut
exit
router rip
ver 2
no auto-summary
network 12.1.1.0
network 23.1.1.0
network 192.168.1.0
do sh run
do ping 192.168.2.1
int e0/0
ip add 12.1.1.2 255.255.255.0
no shut
int e0/1
ip add 23.1.1.2 255.255.255.0
no shut
exit
router rip
ver 2
no auto-summary
network 12.1.1.0
network 23.1.1.0
do sh run
int e0/0
ip add 23.1.1.3 255.255.255.0
no shut
int lo 0
ip add 192.168.2.1 255.255.255.0
no shut
exit
router rip
ver 2
no auto-summary
network 12.1.1.0
network 23.1.1.0
network 192.168.2.0
do sh run
EIGRP
int e0/0
ip add 12.1.1.1 255.255.255.0
no shut
int e0/1
ip add 34.1.1.1 255.255.255.0
no shut
int e0/2
ip add 192.168.1.1 255.255.255.0
no shut
exit
ip route 192.168.2.0 255.255.255.0 e0/0 12.1.1.2
ip route 192.168.2.0 255.255.255.0 e0/1 34.1.1.3 10
int e0/0
ip add 12.1.1.2 255.255.255.0
no shut
int e0/1
ip add 23.1.1.2 255.255.255.0
no shut
int e0/2
ip add 192.168.2.1 255.255.255.0
no shut
exit
ip route 192.168.1.0 255.255.255.0 e0/0 12.1.1.1
ip route 192.168.1.0 255.255.255.0 e0/1 23.1.1.2 10
int e0/0
ip add 34.1.1.3 255.255.255.0
no shut
int e0/1
ip add 23.1.1.3 255.255.255.0
no shut
exit
ip route 192.168.1.0 255.255.255.0 e0/1 34.1.1.1
ip route 192.168.2.0 255.255.255.0 e0/1 23.1.1.2
ip 192.168.1.2 255.255.0.0
ip 192.168.1.2 255.255.255.0 192.168.1.1
ping 192.168.2.2
ip 192.168.2.2 255.255.0.0
ip 192.168.2.2 255.255.255.0 192.168.2.1
ping 192.168.1.2