、    

 

锐捷网管交换机手动配置 IPv6 地址配置举例

一、组网需求
Host A和Host B可以通过IPv6地址进行通信。

二、组网图
IPv6 地址配置组网图

三、配置要点
在接口上开启IPv6协议,并配置IPv6地址。

四、 配置步骤
(1) 配置Device A
# 配置接口GigabitEthernet 0/1的IPv6地址,并允许在该接口上发送RA报文。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# interface gigabitethernet 0/1
DeviceA(config-if-GigabitEthernet 0/1)# ipv6 enable
DeviceA(config-if-GigabitEthernet 0/1)# ipv6 address 1000::1/64
DeviceA(config-if-GigabitEthernet 0/1)# no ipv6 nd suppress-ra
DeviceA(config-if-GigabitEthernet 0/1)# exit

# 配置接口GigabitEthernet 0/2的IPv6地址,并允许在该接口上发送RA报文。
DeviceA(config)# interface gigabitethernet 0/2
DeviceA(config-if-GigabitEthernet 0/2)# ipv6 enable
DeviceA(config-if-GigabitEthernet 0/2)# ipv6 address 2000::1/64
DeviceA(config-if-GigabitEthernet 0/1)# no ipv6 nd suppress-ra
DeviceA(config-if-GigabitEthernet 0/2)# exit

(2) 配置主机
# 配置Host A的IPv6地址为1000::2/24。
# 配置Host B的IPv6地址为2000::2/24。

五、 验证配置结果
# 使用show ipv6 interface可以看到接口添加IPv6地址成功。
DeviceA# show ipv6 interface
interface GigabitEthernet 0/1 is Up, ifindex: 2, vrf_id 0
address(es):
Mac Address: 00:50:56:b0:05:99
INET6: FE80::250:56FF:FEB0:599 , subnet is FE80::/64
INET6: 1000::1 , subnet is 1000::/64
Joined group address(es):
FF01::1
FF02::1
FF02::2
FF02::1:FF00:0
FF02::1:FF00:1
FF02::1:FFB0:599
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND stale time is 3600 seconds
ND advertised reachable time is 0 milliseconds
ND retransmit interval is 1000 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds<480–720>
ND router advertisements live for 1800 seconds
interface GigabitEthernet 0/2 is Down, ifindex: 3, vrf_id 0
address(es):
Mac Address: 00:50:56:b0:05:9a
INET6: FE80::250:56FF:FEB0:59A [ TENTATIVE ], subnet is FE80::/64
INET6: 2000::1 [ TENTATIVE ], subnet is 2000::/64
Joined group address(es):
MTU is 1500 bytes
ICMP error messages limited to one every 100 milliseconds
ICMP redirects are enabled
ND DAD is enabled, number of DAD attempts: 1
ND reachable time is 30000 milliseconds
ND stale time is 3600 seconds
ND advertised reachable time is 0 milliseconds
ND retransmit interval is 1000 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisements are sent every 600 seconds<480–720>
ND router advertisements live for 1800 seconds
# 在Host A上使用Ping测试和Host B的互通性。
# 在Host B上使用Ping测试和Host A的互通性。

六、 配置文件
Device A的配置文件
hostname DeviceA
!
interface gigabitethernet 0/1
ipv6 enable
ipv6 address 1000::1/64
no ipv6 nd suppress-ra
!

 

锐捷网管交换机MGMT 接口属性配置举例

一、组网需求
通过PC的串口连接设备的Console口对MGMT接口配置三层接口属性及二层接口属性。

二、 组网图
MGMT 接口属性组网图

三、配置要点
●PC的串口跟设备的Console口互联。
● 配置设备上MGMT接口三层IPv4地址为192.168.1.1。
●配置管理网络的IPv4网关为192.168.1.2。
●配置设备上MGMT接口三层IPv6地址为2000::1。
● 配置管理网络的IPv6网关为2000::2。
●配置设备上MGMT接口的速率为1000M。

四、 配置步骤
Hostname> enable
Hostname# configure terminal
Hostname(config)# interface mgmt 0
Hostname(config-if-Mgmt 0)# ip address 192.168.1.1 255.255.255.0
Hostname(config-if-Mgmt 0)# gateway 192.168.1.2
Hostname(config-if-Mgmt 0)# ipv6 address 2000::1/64
Hostname(config-if-Mgmt 0)# ipv6 gateway 2000::2
Hostname(config-if-Mgmt 0)# speed 1000

五、验证配置结果
通过show interfaces mgmt 0查看设备上述配置。
Hostname# show interfaces mgmt 0
Index(dec):8193 (hex):2001
Mgmt 0 is UP , line protocol is UP
Hardware is Mgmt, address is 0074.9cee.f4a0 (bia 0074.9cee.f4a0)
Description: IP management Console
Interface address is: 192.168.1.1/24
ARP type: ARPA, ARP Timeout: 3600 seconds
Interface IPv6 address is:
2000::1/64
MGMT
Console Console
FastEthernet
192.168.1.2/24
2000::2/64
192.168.1.1/24
2000::1/64 PC Device
fe80::274:9cff:feee:f4a0/64
MTU 1500 bytes, BW 1000000 Kbit
Encapsulation protocol is Ethernet-II, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
Ethernet attributes:
Last link state change time: 2020-11-19 07:02:08
Time duration since last link state change: 33 days, 2 hours, 0 minutes, 34 seconds
Priority is 0
Medium-type is Copper
Admin duplex mode is AUTO, oper duplex is Full
Admin speed is AUTO, oper speed is 1000M
Rxload is 1/255, Txload is 1/255
Input peak rate: 13994998 bits/sec, at 2020-10-31 15:36:24
Output peak rate: 40693 bits/sec, at 2020-11-11 06:11:34
10 seconds input rate 4461 bits/sec, 7 packets/sec
10 seconds output rate 1688 bits/sec, 1 packets/sec
24580580 packets input, 1939932420 bytes, 0 no buffer, 0 dropped
Received 20239881 broadcasts, 0 runts, 0 giants
116885 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
519832 packets output, 91472361 bytes, 0 underruns, 0 no buffer, 0 dropped
0 output errors, 0 collisions, 0 interface resets

六、配置文件
!
interface MGMT 0
speed 1000
ip address 192.168.1.1 255.255.255.0
ipv6 address 2000::1/64
gateway 192.168.1.1
ipv6 gateway 2000::2
!

锐捷网管交换机配置 PoE 供电辅助功能

一、 组网需求
● 系统功率超过80%时,需要有告警信息提示。
● 在端口上、下电时,需要发送trap通告信息。
● 可识别端口连接的PD设备。

二、 配置要点
● 配置系统告警功率水线为80%。
● 配置使能系统trap发送开关。
● 配置端口g0/1的PD描述符为ap220。

三、 配置步骤
# DeviceA配置。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# poe poe warnig-power 80
DeviceA(config)# poe notification-control enable
DeviceA(config)# interface gigabitEthernet 0/1
DeviceA(config-if)# poe pd-description ap220

四、 验证配置结果
#通过show running查看配置是否正确。

 

锐捷网管交换机配置 PoE 端口供电举例

一、组网需求
●端口g0/1要求稳定供电,尽量不受网络环境影响。
●端口在每日8:00到12:00时间段下电,其他时间上电。
● 端口最大供电功率不超过17W。

二、配置要点
●配置g0/1口优先级为critical。
●配置time-range,并关联PoE的端口time-range配置。
●配置g0/1端口最大功率为15.4W。

三、配置步骤
# 在DeviceA上面配置LACP。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# time-range poe-time
DeviceA(config-time-range)# periodic daily 8:00 to 12:00
DeviceA(config-time-range)# exit
DeviceA(config)# interface gigabitEthernet 0/1
DeviceA(config-if)# poe power-off time-range poe-time
DeviceA(config-if)# poe priority critical
DeviceA(config-if)# poe max-power 15.4

四、验证配置结果
# 通过show poe interface可以查看到配置信息以及供电信息。
DeviceA# show poe interface gigabitEthernet 0/1
Interface : gi0/1
Power enabled : enable
Power status : on
Max power : 15.4W
Current power : 14.8 W
Average power : 14.8 W
Peak power : 14.8 W
LLDP requested power : N/A
LLDP allocated power : N/A
Voltage : 53.5 V
Current : 278 mA
PD class : 4
Trouble cause : None
Priority : critical
Legacy : off
Power-off time-range : poe-time
Power management : auto
4pair status : normal

锐捷网管交换机配置 PoE 系统供电举例

一、组网需求
● 接入的PD设备,消耗功率都比较低,但是接入数量大,满端口接入。
● 要求热启动不间断。

二、配置要点
●切换模式为energy-saving模式。
●配置支持热启动不间断供电功能。

三、配置步骤
# 在DeviceA上面创建AP口。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# poe mode energy-saving
DeviceA(config)# poe uninterruptible-power

# 在DeviceB上面创建AP口。
DeviceB> enable
DeviceB# configure terminal
DeviceB(config)# interface range GigabitEthernet 2/1-2
DeviceB(config-if-range)# port-group 3

四、验证配置结果
# 通过show poe powersupply可以查看到配置信息以及供电信息。
DeviceA# show poe powersupply
Device member : 1
Power management : energy-saving
PSE total power : 125.0 W
PSE total power consumption : 15.0 W
PSE available power : 125.0 W
PSE total remain power : 110.0 W
PSE peak power : 15.0 W
PSE average power : 13.9 W
PSE powered port : 1
PSE disconnect mode : dc
PSE warning power : 90
PSE mcu/pse version : 111/222(mcu/pse)
PSE class lldp : enable
PSE uninterruptible-power : disable
PSE fast on : disable

锐捷网管交换机基于 SNMPv3 的 SNMP 基本功能配置举例

一、组网需求
网络管理站和被管理的网络设备通过网络连接,在网络管理站上,通过SNMP网络管理器,访问网络设备上的管理信息数据库,以及接收来自网络设备主动发出的消息,来对网络设备进行管理和监控。
● 网络工作站(NMS)基于用户的认证加密模式对网络设备(Agent)进行管理。
● 网络设备能够控制用户访问MIB对象的操作权限。
●网络设备能够主动向网管工作站发送验证加密的消息。

二、 组网图
SNMPv3 基本功能配置组网图
三、配置要点
● 配置MIB视图和SNMP用户组。
● 配置SNMP用户。
● 配置SNMP主机。
● 配置Agent的IP地址。

三、 配置步骤
# 创建一个名称为view1点MIB视图,包含关联的MIB对象为1.3.6.1.2.1.1;再创建一个MIB视图“view2”,包含关联的MIB对象(1.3.6.1.2.1.1.4.0)。
Device> enable
Device# configure terminal
Device(config)# snmp-server view view1 1.3.6.1.2.1.1 include

# 创建一个名称为view2点MIB视图,包含关联的MIB对象为1.3.6.1.2.1.1.4.0。
Device(config)# snmp-server view view2 1.3.6.1.2.1.1.4.0 include

# 创建一个名称为g1的SNMP用户组,版本号为v3,安全级别为priv协议的认证加密模式,设置视图view1为可读视图,view2视图为可写视图。
Device(config)# snmp-server group g1 v3 priv read view1 write view2

# 配置SNMP用户。创建名称为user1的用户,属于组g1,选择版本号为v3,配置认证方式为MD5协议认证,认证密码为123,加密方式为DES56加密协议,加密密码为321。
Device(config)# snmp-server user user1 g1 v3 auth md5 123 priv des56 321

# 配置SNMP主机:配置主机地址为192.168.3.2,SNMP版本号为3,安全级别为priv的认证加密模式,关联对应的用户名为user1。
Device(config)# snmp-server host 192.168.3.2 traps version 3 priv user1

# 配置Agent主动向NMS发送Trap消息。
Device(config)# snmp-server enable traps

# 配置Agent的IP地址。配置接口GigabitEthernet 0/1的地址为192.168.3.1/24。
Device(config)# interface gigabitEthernet 0/1
Device(config-if-gigabitEthernet 0/1)# ip address 192.168.3.1 255.255.255.0
Device(config-if-gigabitEthernet 0/1)# exit

四、验证配置结果
# 通过ping命令验证Agent与NMS三层可达。
Device# ping 192.168.3.2
Sending 5, 100-byte ICMP Echoes to 192.168.3.2, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms.
# 通过show snmp user命令查看SNMP用户。
Device# show snmp user
User name: user1
Engine ID: 800013110300d0f8221120
storage-type: permanent active
Security level: auth priv
Auth protocol: MD5
Priv protocol: DES
Group-name: g1
# 通过show snmp view命令查看SNMP视图。
Device# show snmp view
view1(include) 1.3.6.1.2.1.1
view2(include) 1.3.6.1.2.1.1.4.0
default(include) 1.3.6.1
# 通过show snmp group命令查看SNMP组。
Device# show snmp group
groupname: g1
securityModel: v3
securityLevel:authPriv
readview: view1
writeview: view2
notifyview:
# 通过show snmp host命令查看用户配置的主机信息。
Device# show snmp host
Notification host: 192.168.3.2
udp-port: 162
type: trap
user: user1
security model: v3 authPriv
# 安装MIB-Browser查询。在IP Address中输入设备的IP地址:192.168.3.1,在UserName中输入“user1”,在Security Level中选择“AuthPriv”,在AuthPassWord中输入“123”,在AuthProtocol中选择“MD5”,在PrivPassWord中输入“321”。
点击add item按钮,选择要查询的MIB的具体管理单元,比如System。点击Start按钮,便开始对网络设备进行MIB的查询了,具体的查询结果见下图中对话框的最下面的窗口:
选择要查询的MIB的具体管理单元

五、 配置文件
Agent的配置文件
interface GigabitEthernet 0/1
ip address 192.168.2.1 255.255.255.0
!
snmp-server view view1 1.3.6.1.2.1.1 include
snmp-server view view2 1.3.6.1.2.1.1.4.0 include
snmp-server user user1 g1 v3 encrypted auth md5 DE8E9D1158A057A69EF73D1C12C51CC5 priv des56
C767B705F9B261E6D359D4BFBDAF9CF4
snmp-server group g1 v3 priv read view1 write view2
snmp-server host 192.168.3.2 traps version 3 priv user1
snmp-server enable traps
!
end

 

锐捷网管交换机基于 SNMPv2c 的基本功能配置举例

一、组网需求
如下图:通过SNMP网络管理器,来对网络设备进行管理和监控。

二、 组网图
SNMPv2 基本功能配置组网图

 

三、 配置步骤
# 开启SNMP代理功能。
Device> enable
Device# configure terminal
Device(config)# enable service snmp-agent

# 配置名称为comm_v1的读写团体。
Device(config)# snmp-server community comm_v2 rw

# 配置Agent的IP地址。配置接口GigabitEthernet 0/1的地址为192.168.3.1/24。
Device(config)# interface gigabitEthernet 0/1
Device(config-if-gigabitEthernet 0/1)# ip address 192.168.3.1 255.255.255.0
Device(config-if-gigabitEthernet 0/1)# exit

四、验证配置结果
# 通过ping命令验证Agent与NMS三层可达。
Device# ping 192.168.3.2
Sending 5, 100-byte ICMP Echoes to 192.168.3.2, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms.

# 通过show service命令查看SNMP代理功能是否开启。
Device# show service
snmp-agent : enabled
ssh-server : disabled
telnet-server : enabled

五、 配置文件
Agent的配置文件
interface GigabitEthernet 0/1
ip address 192.168.2.1 255.255.255.0
!
snmp-server community comm_v2 rw
!
end

 

锐捷网管交换机基于时间段的 ACL 规则配置举例

一、组网需求
如下图:配置基于时间段的ACL规则,只允许研发部门在每天的12:00到13:30访问Internet。

二、 组网图
基于时间段的 ACL 规则配置组网图

三、配置要点
●Device A配置时间段,并添加每天12:00到13:30的时间段表项。
●Device A配置IP标准ACL并添加规则,包括:
○ 添加允许源IP网段地址为10.1.1.0/24的规则,关联的时间段为access-internet。
○ 添加禁止源IP网段地址为10.1.1.0/24的规则。表明时间段之外都不允许访问Internet。
○ 添加允许除研发网段地址外,其他所有网段地址的规则。
● Device A将ACL应用在连接研发部接口的入方向上。

四、 配置步骤
(1) 配置时间区。
# Device A配置时间段。
DeviceA> enable
DeviceA# configure terminal
DeviceA(config)# time-range access-internet
DeviceA(config-time-range)# periodic daily 12:00 to 13:30
DeviceA(config-time-range)# exit
(2) 配置IP标准ACL并添加访问规则。
# Device A配置IP标准ACL并添加访问规则。
DeviceA(config)# ip access-list standard ip_std_internet_acl
DeviceA(config-std-nacl)# permit 10.1.1.0 0.0.0.255 time-range access-internet
DeviceA(config-std-nacl)# deny 10.1.1.0 0.0.0.255
DeviceA(config-std-nacl)# permit any
DeviceA(config-std-nacl)# exit
(3) 将IP标准ACL应用到接口上。
# Device A将ACL应用在连接研发部接口的入方向上。
DeviceA(config)# interface gigabitethernet 0/1
DeviceA(config-if-GigabitEthernet 0/1)# ip access-group ip_std_internet_acl in

五、 验证配置结果
● 检查Device A设备ACL配置命令是否正确。
DeviceA# show time-range
time-range entry: access-internet (inactive)
periodic Daily 12:00 to 13:30
DeviceA# show access-lists
ip access-list standard ip_std_internet_acl
10 permit 10.1.1.0 0.0.0.255 time-range access-internet (inactive)
20 deny 10.1.1.0 0.0.0.255
30 permit any
DeviceA# show access-group
ip access-group ip_std_internet_acl in
Applied On interface GigabitEthernet 0/1
# 在时间段生效期内(12:00至13:30),从研发部分内的某台PC机访问百度主页,确认可以访问。
# 在时间段失效期(12:00至13:30时段外),从研发部分内的某台PC机访问百度主页,确认不能访问。

六、 配置文件
● DeviceA的配置文件
hostname DeviceA
!
ip access-list standard ip_std_internet_acl
10 permit 10.1.1.0 0.0.0.255 time-range access-internet
20 deny 10.1.1.0 0.0.0.255
30 permit any
!
time-range access-internet
periodic daily 12:00 to 13:30
!
interface GigabitEthernet 0/1
no switchport
ip access-group ip_std_internet_acl in
ip address 10.1.1.1 255.255.255.0
!

 

锐捷网管交换机IP 扩展 ACL 配置举例

一、组网需求
如下图:Device A(VLAN 1)、Device B(VLAN 2)和Device C(VLAN 3)直连Device D,Device D是所有主机的网关。
需求1:VLAN2与VLAN3之间不可以Ping通,VLAN1与VLAN2可以Ping通,VLAN1与VLAN3可以Ping通。
需求2:VLAN1与VLAN2的DHCP报文互相不可达,其他正常通信。需求3:VLAN1不能通过Telnet或者SSH访问VLAN3,其他正常通信。

二、 组网图
IP 扩展 ACL 配置组网图

三、配置要点
● Device D配置IP扩展ACL并添加访问规则,过滤UDP端口号67或者68可以实现需求2。Device C配置IP扩展ACL并添加访问规则,过滤TCP端口23和22可以实现需求3。
●Device D将IP扩展ACL分别应用在VLAN1接口、VLAN2接口和VLAN3接口上。Device C将IP扩展ACL应用在与Device D相线路上。

四、 配置步骤
(1) 配置所有设备接口的IP地址(略)。
(2) 配置IP扩展ACL并添加访问规则。
# Device D配置IP扩展ACL并添加访问规则。
DeviceD> enable
DeviceD# configure terminal
DeviceD(config)# ip access-list extended inter_vlan_access1
DeviceD(config-ext-nacl)# deny udp any eq bootps any eq bootpc
DeviceD(config-ext-nacl)# deny udp any eq bootpc any eq bootps
DeviceD(config-ext-nacl)# remark 拒绝 DHCP 报文
DeviceD(config-ext-nacl)# permit ip any any
DeviceD(config-ext-nacl)# remark 允许其他报文通信
DeviceD(config-ext-nacl)# exit
DeviceD(config)# ip access-list extended inter_vlan_access2
DeviceD(config-ext-nacl)# deny ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
DeviceD(config-ext-nacl)# remark 拒绝 VLNN2 和 VLAN3 之间互 ping
DeviceD(config-ext-nacl)# deny udp any eq bootpc any eq bootps
DeviceD(config-ext-nacl)# deny udp any eq bootps any eq bootpc
DeviceD(config-ext-nacl)# remark 拒绝 DHCP 报文
DeviceD(config-ext-nacl)# permit ip any any
DeviceD(config-ext-nacl)# remark 允许其他报文通信
DeviceD(config-ext-nacl)# exit
DeviceD(config)# ip access-list extended inter_vlan_access3
DeviceD(config-ext-nacl)# deny ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
DeviceD(config-ext-nacl)# remark 拒绝 VLNN3 和 VLAN2 之间互 ping
DeviceD(config-ext-nacl)# permit ip any any
DeviceD(config-ext-nacl)# remark 允许其他报文通信
DeviceD(config-ext-nacl)# exit

# Device C配置IP扩展ACL并添加访问规则。
DeviceC> enable
DeviceC# configure terminal
DeviceC(config)# ip access-list extended access_deny
DeviceC(config-ext-nacl)# deny tcp 192.168.1.0 0.0.0.255 eq telnet any eq telnet
DeviceC(config-ext-nacl)# remark 拒绝 VLAN1 通过 Telnet 访问 VLAN 3
DeviceC(config-ext-nacl)# deny tcp 192.168.1.0 0.0.0.255 eq 22 any eq 22
DeviceC(config-ext-nacl)# remark 拒绝 VLAN1 通过 SSH 访问 VLAN 3
DeviceC(config-ext-nacl)# exit

(3) 应用IP扩展ACL。
# Device D将IP扩展ACL应用到对应接口上。
DeviceD(config)# interface vlan 1
DeviceD(config-if-VLAN 1)# ip access-group inter_vlan_access1 in
DeviceD(config-if-VLAN 1)# exit
DeviceD(config)# interface vlan 2
DeviceD(config-if-VLAN 2)# ip access-group inter_vlan_access2 in
DeviceD(config-if-VLAN 2)# exit
DeviceD(config)# interface vlan 3
DeviceD(config-if-VLAN 3)# ip access-group inter_vlan_access3 in
DeviceD(config-if-VLAN 3)# exit

# Device C将IP扩展ACL应用到与Device D相连线路上。
DeviceC(config)# line vty 0
DeviceC(config-line)# access-class access_deny in
DeviceC(config-line)# exit

五、验证配置结果
(1) 验证连通性。
# VLAN 1与VLAN 2之间可以Ping通,VLAN 1与VLAN 3之间可以Ping通。
DeviceA# ping 192.168.2.2
Sending 5, 100-byte ICMP Echoes to 192.168.2.2, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/8/10 ms
DeviceA#
DeviceA# ping 192.168.3.2
Sending 5, 100-byte ICMP Echoes to 192.168.3.2, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/8/10 ms

# VLAN 2与VLAN 3之间不可以Ping通。
DeviceB# ping 192.168.3.2
Sending 5, 100-byte ICMP Echoes to 192.168.3.2, timeout is 2 seconds:
< press Ctrl+C to break >
…..
Success rate is 0 percent (0/5)

(2) VLAN 1不能通过Telnet访问VLAN 3。
DeviceA# ping 192.168.3.2
Sending 5, 100-byte ICMP Echoes to 192.168.3.2, timeout is 2 seconds:
< press Ctrl+C to break >
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/8/10 ms
DeviceA#
DeviceA# telnet 192.168.3.2
Trying 192.168.3.2, 23…
% Destination unreachable; gateway or host down

六、 配置文件
●Device D的配置文件
hostname DeviceD
!
vlan 1
!
vlan 2
!
vlan 3
!
ip access-list extended inter_vlan_access1
10 deny udp any eq bootps any eq bootpc
20 deny udp any eq bootpc any eq bootps
remark 拒绝 DHCP 报文
30 permit ip any any
remark 允许其他报文通信
!
ip access-list extended inter_vlan_access2
10 deny ip 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
remark 拒绝 VLNN2 和 VLAN3 之间互 ping
20 deny udp any eq bootpc any eq bootps
30 deny udp any eq bootps any eq bootpc
remark 拒绝 DHCP 报文
40 permit ip any any
remark 允许其他报文通信
!
ip access-list extended inter_vlan_access3
10 deny ip 192.168.3.0 0.0.0.255 192.168.2.0 0.0.0.255
remark 拒绝 VLNN3 和 VLAN2 之间互 ping
20 permit ip any any
remark 允许其他报文通信
!
interface GigabitEthernet 1/0
switchport access vlan 1
description link_to_DeviceA
!
interface GigabitEthernet 1/1
switchport access vlan 2
description link_to_DeviceB
!
interface GigabitEthernet 1/2
switchport access vlan 3
description link_to_DeviceC
!
interface VLAN 1
ip access-group inter_vlan_access1 in
ip address 192.168.1.1 255.255.255.0
!
interface VLAN 2
ip access-group inter_vlan_access2 in
ip address 192.168.2.1 255.255.255.0
!
interface VLAN 3
ip access-group inter_vlan_access3 in
ip address 192.168.3.1 255.255.255.0
!

● Device A的配置文件
hostname DeviceA
!
interface GigabitEthernet 0/1
ip address 192.168.1.2 255.255.255.0
!

● Device B的配置文件
hostname DeviceB
!
interface GigabitEthernet 0/1
ip address 192.168.2.2 255.255.255.0
!

● Device C的配置文件
hostname DeviceC
!
ip access-list extended access_deny
10 deny tcp 192.168.1.0 0.0.0.255 eq telnet any eq telnet
remark 拒绝 VLAN1 通过 Telnet 访问 VLAN 3
20 deny tcp 192.168.1.0 0.0.0.255 eq 22 any eq 22
remark 拒绝 VLAN1 通过 SSH 访问 VLAN 3
!
interface GigabitEthernet 0/1
ip address 192.168.3.2 255.255.255.0
!
line vty 0
access-class access_deny in
login
password abcdef
!

 

锐捷网管交换机OSPF虚连接配置举例

一、组网需求
如下图:Area 2没有和Area 0直接连接,为保证网络中OSPF运行正常,在Device B和Device C之间配置虚链路。

二、 组网图
虚连接配置组网图

三、配置要点
● 所 有设备配置接口IP地址。
● 所有设备配置OSPF基本功能。
● 在Device B、C上配置虚链路。

四、 配置步骤
(1) 配置各接口的IP地址和OSPF路由协议。
(2) 在Device B、C上配置虚链路。
# Device B的配置。
Device B> enable
Device B# configure terminal
Device B(config)# router ospf 1
Device B(config-router)# area 1 virtual-link 192.168.23.3

# Device C的配置。
Device C> enable
Device C# configure terminal
Device C(config)# router ospf 1
Device C(config-router)# area 1 virtual-link 192.168.12.2

五、验证配置结果
# 检查Device A上使用show ip ospf database能学习到区域2的路由。
Device A# show ip ospf database
OSPF Router with ID (192.168.12.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
192.168.12.1 192.168.12.1 1025 0x80000002 0x00292E 1
192.168.12.2 192.168.12.2 3 0x80000004 0x00DA5E 2
192.168.23.3 192.168.23.3 7 (DNA) 0x80000001 0x001328 0
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.12.2 192.168.12.2 1031 0x80000001 0x00CE8E
Summary Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
192.168.23.0 192.168.12.2 820 0x80000001 0x0077CC
192.168.23.0 192.168.23.3 7 (DNA) 0x80000001 0x002414
192.168.34.0 192.168.23.3 7 (DNA) 0x80000001 0x00AA82

六、 配置文件
● Device B的配置文件。
!
router ospf 1
area 1 virtual-link 192.168.23.3
!
● Device C的配置文件。
!
router ospf 1
area 1 virtual-link 192.168.12.2
!

 

ICP备案号:晋ICP备18007549号-1