LAB1:Default gateway(不运行代理ARP)
step1:
PC4(config)#ip default-gateway 192.168.1.2(设定默认网关)
PC5(config)#ip default-gateway 192.168.1.3
step2:
关闭两个出口路由器R2/3,的内口(以太口)的代理ARP:
R2/3(CONFIG)#INT E0
NO IP PROXY-ARP
SHOW IP INT E 0
...PROXY ARP IS DISABLED
STEP3:在外网运行动态路由协议RIP:
R1/2/3#
ROUTER RIP
VER 2
NO AUTO
R1:NET 1.0.0.0/12.0.0.0/13.0.0.0
R2:NET 12.0.0.0
R3:NET 13.0.0.0
SHO IP ROUTE RIP
R1:DEBUG IP PACKET
R4:PING 1.1.1.1
R1:UN ALL
STEP4:R2/3上,做NAT:(基于NAT路由器外口地址的端口复用)
4-1:定义内网的用户群:
ACCESS-LIST 1 PERMIT 192.168.1.0 0.0.0.255
4-2:定义NAT的内口/外口:
int s 0
ip nat outside
int e 0
ip nat inside
4-3:进行基于NAT路由器外口地址的端口复用:
ip nat inside source list 1 interface serial 0 overload
LAB2:Proxy ARP/代理ARP:
The client uses ARP to get the destination it wants to reach,
and a router will respond to the ARP request with its own MAC address.
step 1:
PC主机上,无需配置网关:
pc4/5# no ip default-gateway
r2/3#int e 0
ip proxy-arp
Routing protocol (路由协议):
The client listens to dynamic routing protocol updates(for example,from IGP RIP/OSPF )And forms its own routing table 。
IRDP(ICMP Router Discovery Protocol):
IRDP client-the client runs an ICMP(Internet Control Message Protocol) router discovery client ;
缺陷:网络收敛性较慢;而且兼容性差→受限于主机的操作系统→少有操作系统支持!
热备份路由协议HSRP(Hot Standby Router Protocol):
HRSP是CISCO私有的,特点是收敛快;
The HSRP(Hot Standby Router Protocol) is a FHRP(First-Hop Redundancy Protocol),Designed to allow for transparent fail-over of the first-hop IP router 。
HSRP provides high network availability by providing first-hop routing redundancy for IP hosts on Ehernet, with a default gateway IP address.
GLBP(Gateway Load Balancing Protocol):
GLBP是CISCO私有的协议,和它竞争的是HSRP和VRRP;GLBP使用的组播地址是:224.0.0.12 ;
The advantage of GLBP is that it additionally provides load balancing over multiple routers(gateways) using a single virtual ip address and multiple virtual MAC addresses;
配置命令:Interface fastethernet 0/0 →Ip address 10.21..8.32 255.255.255.0 →Glbp 10 priority 100 →Glbp 10 preempt →Glbp 10 ip 10.0.0.1 。
LAB2:代理ARP:
STEP1:接上个实验:
ARP的欺骗:the client uses ARP(Address Resolution Protocol) Toget the destingation it wants to reach , and a router will respond to the ARP request with its own MAC address ;
PC上无需配置网关:(c)#no ip default-gateway;
STEP2:在网关路由器上启动ARP(默认启动但是刚刚关了):
(c)#int e0 →ip proxy-arp ;
STEP3:测试ARP的运作:
分别在PC4/PC5 上ping1.1.1.1进行测试;
清理ARP进程的命令:#clear arp-cache 。
LAB:不同子网(VLAN)间的负载均衡:(R2600)
r2:
int e 0/0.10
en dot1q 10
ip add 192.168.10.2 255.255.255.0
standby 10 ip 192.168.10.100
standby 10 ip priority 105
standby 10 ip preempt
standby 10 name vr-10
standby 10 track s 0/0
int e 0/0.20
en dot1q 20
ip add 192.168.20.2 255.255.255.0
standby 20 ip 192.168.20.100
standby 20 ip priority 100
standby 20 ip preempt
standby 20 name vr-20
standby 20 track s 0/0
r3:
int e 0/0.10
en dot1q 10
ip add 192.168.10.3 255.255.255.0
standby 10 ip 192.168.10.100
standby 10 ip priority 100
standby 10 ip preempt
standby 10 name vr-10
standby 10 track s 0/0
int e 0/0.10
en dot1q 10
ip add 192.168.20.3 255.255.255.0
standby 20 ip 192.168.20.100
standby 20 ip priority 105
standby 20 ip preempt
standby 20 name vr-20
standby 20 track s 0/0
更先进的拓扑(看2-13图)
sw1:
int vlan10
ip add 192.168.10.1 255.255.255.0
standby 10 ip 192.168.10.100
standby 10 ip priority 105
standby 10 ip preempt
standby 10 name vr-10
int vlan20
ip add 192.168.20.1 255.255.255.0
standby 20 ip 192.168.20.100
standby 20 ip priority 100
standby 20 ip preempt
standby 20 name vr-20
sw2:
int vlan10
ip add 192.168.10.3 255.255.255.0
standby 10 ip 192.168.10.100
standby 10 ip priority 100
standby 10 ip preempt
standby 10 name vr-10
int vlan20
ip add 192.168.20.3 255.255.255.0
standby 20 ip 192.168.20.100
standby 20 ip priority 105
standby 20 ip preempt
standby 20 name vr-20
VRRP:原理与HSRP一样
ra#int e 0
ip add 192.168.1.3 255.255.255.0
vrrp 1 description vr-1
vrrp 1 priority 105
vrrp 1 preempt
vrrp 1 ip 192.168.1.100
rb#int e 0
ip add 192.168.1.2 255.255.255.0
vrrp 1 description vr-1
vrrp 1 priority 100
vrrp 1 preempt
vrrp 1 ip 192.168.1.100
GLBP:(CISCO私有)(Gateway load balancing protocol)
The advantage of GLBP is that it additionally provides load balancing over multiple routers(gateways), mapping a single virtual ip address to multiple virtual MAC addresses;
ra#int fa 0/0
ip add 192.168.10.2 255.255.255.0
glbp 10 priority 105
glbp 10 preempt
glbp 10 ip 192.168.10.100
rb#int fa 0/0
ip add 192.168.10.3 255.255.255.0
glbp 10 priority 100
glbp 10 preempt
glbp 10 ip 192.168.10.100