网段的最终表现形式是IP地址,也就是说路由器的IP地址,那么我们如何配置路由器的IP地址呢?
还是拿上一个拓扑图来举例子:
路由器AR1配置如下
[AR1]interface GigabitEthernet 0/0/0
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
配置路由器AR2
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]ip address 192.168.1.2 24
[AR2]interface GigabitEthernet 0/0/1
[AR2-GigabitEthernet0/0/1]ip address 192.168.2.1 24
路由器AR3配置
[AR3]interface GigabitEthernet 0/0/0
[AR3-GigabitEthernet0/0/0]ip address 192.168.2.2 24
[AR3]interface GigabitEthernet 0/0/1
[AR3-GigabitEthernet0/0/1]ip address 192.168.3.1 24
配置AR4
[AR4]interface GigabitEthernet 0/0/0
[AR4-GigabitEthernet0/0/0]ip address 192.168.3.2 24
如何查看配置好的IP地址呢?有两种方式
我们可以进入某个接口通过命令display this 查询这个接口的IP
[AR2]interface GigabitEthernet 0/0/0
[AR2-GigabitEthernet0/0/0]display this
第二种通过命令:display ip interface brief查看所有接口IP
>AR2