通过配置实现对路由器的远程管理,要求如下:
1,创建远程登录用户为test01,密码为123
2,在交换机上操作,使用ssh协议
从交换机上远程管理路由器,如图-1所示
图-1
实现此案例需要按照如下步骤进行。
步骤一:配置路由器
ar2220 路由器配置
- <Huawei>system-view
- Enter system view, return user view with Ctrl+Z.
- [Huawei]interface GigabitEthernet 0/0/0
- [Huawei-GigabitEthernet0/0/0]ip address 192.168.1.254 24
- [Huawei-GigabitEthernet0/0/0]quit
- [Huawei]aaa
- [Huawei-aaa]local-user test01 password cipher 123
- [Huawei-aaa]local-user test01 privilege level 3
- [Huawei-aaa]local-user test01 service-type ssh
- [Huawei-aaa]quit
- [Huawei]user-interface vty 0 4
- [Huawei-ui-vty0-4]authentication-mode aaa
- [Huawei-ui-vty0-4]protocol inbound ssh
- [Huawei-ui-vty0-4]quit
- [Huawei]stelnet server enable
步骤二:配置路由器
S3700交换机配置
- <Huawei>system-view
- Enter system view, return user view with Ctrl+Z.
- [Huawei]interface Vlanif 1
- [Huawei-Vlanif1]ip address 192.168.1.100 24
- [Huawei-Vlanif1]quit
- [Huawei]ssh client first-time enable
- [Huawei]stelnet 192.168.1.254
- Please input the username:test01
- Trying 192.168.1.254 ...
- Press CTRL+K to abort
- Connected to 192.168.1.254 ...
- The server is not authenticated. Continue to access it? [Y/N] :y
- Save the server's public key? [Y/N] :y
- The server's public key will be saved with the name 192.168.1.254. Please wait..
- .
- Enter password:
1,将下列数字转换为十进制数
11011101、1101、101010
2,将下列数字转换为二进制
156、26、104
实现此案例需要按照如下步骤进行。
1,将下列数字转换为十进制数
(11011101)2=221
(1101)2=13
(101010)2=42
2,将下列数字转换为二进制
156=(10011100)2
26=(11010)2
104=(1101000)2
将208.16.43.0/24划分为8个网段,并应用前4个在下列拓扑中
首先将该地址划分成8个网段,结果是
208.16.43.0
208.16.43.32
208.16.43.64
208.16.43.96
208.16.43.128
208.16.43.160
208.16.43.192
208.16.43.224
然后在交换机与pc应用,如图-2所示
图-2
实现此案例需要按照如下步骤进行。
步骤一:在交换机进行配置
- <Huawei>system-view
- Enter system view, return user view with Ctrl+Z.
- [Huawei]vlan batch 2 3 4
- Info: This operation may take a few seconds. Please wait for a moment...done.
- [Huawei]interface Vlanif 1
- [Huawei-Vlanif1]ip add
- [Huawei-Vlanif1]ip address 208.16.43.30 27
- [Huawei-Vlanif1]in vlan 2
- [Huawei-Vlanif2]ip address 208.16.43.62 27
- [Huawei-Vlanif2]in vlan 3
- [Huawei-Vlanif3]ip address 208.16.43.94 27
- [Huawei-Vlanif3]in vlan 4
- [Huawei-Vlanif4]ip address 208.16.43.126 27
- [Huawei-Vlanif4]quit
- [Huawei]interface GigabitEthernet 0/0/2
- [Huawei-GigabitEthernet0/0/2]port link-type access
- [Huawei-GigabitEthernet0/0/2]port default vlan 2
- [Huawei-GigabitEthernet0/0/2]in g0/0/3
- [Huawei-GigabitEthernet0/0/3]port link-type access
- [Huawei-GigabitEthernet0/0/3]port default vlan 3
- [Huawei-GigabitEthernet0/0/3]in g0/0/4
- [Huawei-GigabitEthernet0/0/4]port link-type access
- [Huawei-GigabitEthernet0/0/4]port default vlan 4
步骤二:在各vlan所在主机配置的ip如下
vlan1主机如图-3所示
图-3
vlan2主机如图-4所示
图-4
vlan3主机如图-5所示
图-5
vlan4主机如图-6所示
图-6
通过配置IPv6地址使下列拓扑中的设备互通,如图-7所示
图-7
实现此案例需要按照如下步骤进行。
步骤一:在路由器配置
此步骤需要在上一实验基础上进行
- <Huawei>system-view
- Enter system view, return user view with Ctrl+Z.
- [Huawei]ipv6
- [Huawei]interface GigabitEthernet 0/0/0
- [Huawei-GigabitEthernet0/0/0]ipv6 enable
- [Huawei-GigabitEthernet0/0/0]ipv6 address 2001:2::254 64
- [Huawei-GigabitEthernet0/0/0]in g0/0/1
- [Huawei-GigabitEthernet0/0/1]ipv6 enable
- [Huawei-GigabitEthernet0/0/1]ipv6 address 2001:1::254 64
步骤二:各主机配置的ip如下
PC1主机如图-8所示
图-8
PC2主机如图-9所示
图-9
PC3主机如图-10所示
图-10