第六章 二层冗余技术(MLT,SMLT,IST)
这里只介绍北电独有的MLT ,SMLT 和IST。这些是二层的冗余协议:
MLT:多链路中继,将多条链路模拟成一条链路
SMLT: 分离的多链路中继,将在不同设备上得多条链路模拟成如MLT达到的效果,并且可以防止环路的产生,因为这个技术使冗余链路间实现负载均衡
IST:这个技术是配合SMLT来操作的,它是用来交换两台设备间的网络数据的。
IST是启用SMLT技术的前提,它主要用于两台核心交换机进行信息的同步的链路通道。
 
环境描述:
    8300A 和8300B作为核心设备使用SMLT技术与接入层设备4500A和4500B相连,IST专属VLAN2,4500A的属于VLAN 200,4500B属于VLAN300
建立IST
Create MLT 1 for IST on ERS 8300A(2=3999)
ERS8300A:5# config vlan 2 create byport 1 name "IST"
ERS8300A:5# config vlan 2 ip create 10.50.2.1/255.255.255.252
ERS8300A:5# config mlt 1 create      //创建MLT 1
ERS8300A:5# config mlt 1 add ports 2/1,2/30 //端口2/1和2/30加入到MLT 1
ERS8300A:5# config vlan 2 add-mlt 1    //因为MLT也是一个逻辑的端口,所以对于端口的操作都可以实现,如下,加入VLAN ,启中继等  
ERS8300A:5# config mlt 1 name "IST"
ERS8300A:5# config mlt 1 perform-tagging enable
ERS8300A:5# config mlt 1 ist create ip 10.50.2.2 vlan-id 2  //创建IST,需要指定对端的IP 和相应的VLAN号
ERS8300A:5# config mlt 1 ist enable //管理启动IST
Create MLT 1 for IST on ERS 8300B
ERS8300B:5# config vlan 2 create byport 1 name "IST"
ERS8300B:5# config vlan 2 ip create 10.50.2.2/255.255.255.252
ERS8300B:5# config mlt 1 create
ERS8300B:5# config mlt 1 add ports 2/1,2/30
ERS8300B:5# config vlan 2 add-mlt 1
ERS8300B:5# config mlt 1 name "IST"
ERS8300B:5# config mlt 1 perform-tagging enable
ERS8300B:5# config mlt 1 ist create ip 10.50.2.1 vlan-id 2
ERS8300B:5# config mlt 1 ist enable
查看信息:
SHOW MLT IST INFO(查看UP)
 
第二步创建SMLT
创建基于MLT的SMLT 20 在ERS8300A
ERS8300A:5# config vlan 200 create byport 1 name "Closet_Sw1"
ERS8300A:5# config vlan 200 ip create 10.50.200.1/255.255.255.0
ERS8300A:5# config mlt 20 create
ERS8300A:5# config mlt 20 add ports 3/3
ERS8300A:5# config mlt 20 perform-tagging enable
ERS8300A:5# config vlan 200 add-mlt 20
ERS8300A:5# config vlan 200 add-mlt 1
ERS8300A:5# config mlt 20 name "SMLT-20"
ERS8300A:5# config mlt 20 smlt create smlt-id 20   //创建SMLT 20
创建基于MLT的SMLT 20 在ERS8300B
ERS8300B:5# config vlan 200 create byport 1 name "Closet_Sw1"
ERS8300B:5# config vlan 200 ip create 10.50.200.2/255.255.255.0
ERS8300B:5# config mlt 20 create
ERS8300B:5# config mlt 20 add ports 3/3
ERS8300B:5# config mlt 20 perform-tagging enable
ERS8300B:5# config vlan 200 add-mlt 20
ERS8300B:5# config vlan 200 add-mlt 1
ERS8300B:5# config mlt 20 name "SMLT-20"
ERS8300B:5# config mlt 20 smlt create smlt-id 20  //创建SMLT 20
查看信息:
Show mlt  smlt  info
 
创建基于单链路的SMLT 30 在ERS8300A SLT
ERS8300A:5# config vlan 300 create byport 1 name "Closet_Sw2"
ERS8300A:5# config vlan 300 ip create 10.50.300.1/255.255.255.0
ERS8300A:5# config vlan 300 add-mlt 1
ERS8300A:5# config Ethernet 2/6 perform-tagging enable
ERS8300A:5# config vlan 300 ports add 2/6
ERS8300A:5# config ethernet 2/6 smlt 30 create
创建基于单链路的SMLT 30  在ERS8300B
ERS8300B:5# config vlan 300 create byport 1 name "Closet_Sw2"
ERS8300B:5# config vlan 300 ip create 10.50.300.2/255.255.255.0
ERS8300B:5# config Ethernet 2/6 perform-tagging enable
ERS8300B:5# config vlan 300 ports add 2/6
ERS8300B:5# config vlan 200 add-mlt 1
ERS8300B:5# config ethernet 2/6 smlt 30 create
# #需要边缘设备上联8300的两个端口启用MLT(TRUNK)#
查看信息:
Show smlt
 
第七章 三层冗余技术VRRP-BACKUP MASTER (ERS 8300和ERS 8600)
VRRP(Virtual Router Redundancy Protocol,虚拟路由器冗余协议)将可以承担网关功能的一组路由器加入到备份组中,形成一台虚拟路由器,由VRRP的选举机制决定哪台路由器承担转发任务,局域网内的主机只需将虚拟路由器配置为缺省网关
以第六章的拓扑图为基准
接入交换机vlan200启用VRRP,实现三层的网关冗余,虚拟的IP 地址分别是10.50.200.3
ERS8600A VRRP CONFIG
ERS8300A:5#vlan 200 ip vrrp 80 address 10.50.200.3 
ERS8300A:5#vlan 200 ip vrrp 80 backup-master enable 
ERS8300A:5#vlan 200 ip vrrp 80 holddown-timer 60 
ERS8300A:5#vlan 200 ip vrrp 80 priority 101 
ERS8300A:5#vlan 200 ip vrrp 80 enable
ERS8600B VRRP CONFIG
ERS8300B:5#vlan 200 ip vrrp 80 address 10.50.200.3 
ERS8300B:5#vlan 200 ip vrrp 80 backup-master enable 
ERS8300B:5#vlan 200 ip vrrp 80 holddown-timer 60 
ERS8300B:5#vlan 200 ip vrrp 80 priority 100 
ERS8300B:5#vlan 200 ip vrrp 80 enable
查看信息:
Show ip vrrp info 
第八章 访问控制限制 (ERS 8300和ERS 8600)
下面这个例子将对于配置这两个技术进行简单的操作和叙述。
 

1. 允许原地址10.1.10.10-15的客户的HTTP流量通过交换机,其他流量全被丢掉(在ERS8300的配置)
ERS8300:5# config filter acl 1 create ip acl-name ace-ip-1 //创建一个基于IP的ACL 1
ERS8300:5# config filter acl 1 ace 1 action permit 
ERS8300:5# config filter acl 1 ace 1 ip src-ip 10.1.10.10 range 10.1.10.15 
ERS8300:5# config filter acl 1 ace 1 protocol tcp eq 
ERS8300:5# config filter acl 1 ace 1 port dst-port http eq 
ERS8300:5# config filter acl 1 ace default action deny
ERS8300:5# config filter acg 1 create 1  //创建ACG 1 并将ACL 1 加入到ACG 1
ERS8300:5# config ethernet 1/1-1/7 filter create 1 //将ACG 1应用到接口1/1-1/7
2. 限制3/1接口只能通过原地址为192.168.121.20,目的为172.18.5.2的流量其他都丢掉。(在8600的配置)
ERS8610:5# config filter act 1 create name vlan-filter
ERS8610:5# config filter act 1 ip srcIp,dstIp,ipProtoType
ERS8610:5# config filter act 1 apply
ERS8610:5# config filter acl 1 create inPort act 1
ERS8610:5# config filter acl 1 set global-action count
ERS8610:5# config filter acl 1 port add 3/1(所有的TRUNK接口)
ERS8610:5# config filter acl 1 ace 1 create name "vadio1"
ERS8610:5# config filter acl 1 ace 1 action permit
ERS8610:5# config filter acl 1 ace 1 ip src-ip eq 192.168.121.20/32
ERS8610:5# config filter acl 1 ace 1 ip dst-ip eq 172.18.5.2/32
ERS8610:5# config filter acl 1 ace 1 enable
ERS8610:5#config filter acl 1 set default-action deny
第九章 DHCP-RELAY功能
PC再通过DHCP去获取地址的时候,是通过广播的方式去请求的,但是VLAN是用于阻隔广播包的,如果将DHCP放在一个VLAN,其他的VLAN的PC就不可能从这个DHCP服务器拿到IP地址,除非每个VLAN都设置一个DHCP服务器,但是这个成本太高了,所以使用DHCP-RELAY这个技术来解决跨VLAN获取地址。
 
ERS8610:5#config vlan 123 ip dhcp-relay enable
ERS8610:5#config ip dhcp-relay create-fwd-path agent 172.16.1.254 server 10.9.1.1 mode bootp_dhcp state enable
查看信息:
Show ip dhcp-relay counters
 
Show ip dhcp-relay fwd-path
 
第十章 接口的高级特性
8.1  POE
PoE(Power over Ethernet,以太网供电,又称远程供电)是指设备通过以太网接口,利用双绞线对外接PD(Powered Device,受电设备)设备(如IP 电话、无线AP、网络摄像头等)进行远程供电。
PoE 系统包括PoE 电源、PSE 和PD。
• PoE 电源
PoE 电源为整个PoE 系统供电,分为外置电源和内置电源两种类型。
• PSE 
PSE(Power Sourcing Equipment,供电设备)是单板(子卡)。每个PSE 对单板(子卡)内的PoE 接口进行独立管理。PSE 在PoE 接口的线路上寻找、检测PD,对PD 分类,并向其供电。当检测到PD 拔出后,PSE 停止供电。具备PoE 供电能力的以太网接口称为PoE 接口,包括FE 和GE。
• PD 
PD 是接受PSE 供电的设备。分为标准PD 和非标准PD,标准PD 是指符合IEEE802.3af 标准的PD 设备。PD 设备在接受PoE 电源供电的同时,允许连接其他电源供电,进行电源冗余备份。
在ERS8300 ,8600 和1600系列交换机中,只有8300支持POE功能。
 Config poe port <port id> 
admin <enable|disable>   // POE功能的控制
    info                     // 查看该端口POE的参数
    power-priority <low|high|critical>  //设置POE在该端口的优先级,当PD过多,超过交换机支持的界限时,就会从低优先级停止供电。
    power-limit <3-16>   //设置该端口提供的电源的功率
power-detection-control  <auto|test>  //指定PD设备的发现方式
type <other|telephone|webcam|wireless>  //指定PD设备的类型
8.2 端口镜像
端口镜像是将指定端口的报文复制一份到镜像目的端口,镜像目的端口会与数据监测设备相连,用户利用这些数据监测设备来分析复制到目的端口的报文,进行网络监控和故障排除
Passport-8310:5#config diag mirror-by-port 1 create in-port <port id> out-port <port id> mode {tx|rx|both} enable{false|true}  //建立一组监控,组号为1
注意:如果想要一个端口监控多个端口,就要多建立几组监控
如 5/1接口5/3接口的所有收,发信息
Passport-8310:5#config diag mirror-by-port 1 create in-port 5/1 out-port 5/3 mode both enable true