2024年8月5日 10:56:21
This commit is contained in:
parent
3c0baea54e
commit
59db698f4d
@ -90,26 +90,36 @@
|
||||
|
||||
### 二、路由配置
|
||||
|
||||
1. #### 连通两个不同网段
|
||||
1. #### 连通两个不同网段(直连路由)
|
||||
|
||||
- 建立两个不同网段192.168.1.0/24与192.168.2.0/24,设置PC端网关,IP、子网掩码、网关(与路由端口对应的IP地址一致),各自网段可互相Ping通
|
||||
|
||||
- 路由端口设置IP(网关)
|
||||
|
||||
![image-20240805105527297](https://picgo-noriu.oss-cn-beijing.aliyuncs.com/Images/image-20240805105527297.png)
|
||||
|
||||
```
|
||||
<Huawei>display ip routing-table
|
||||
|
||||
[Huawei]interface GigabitEthernet 0/0/0
|
||||
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.254 24 ## 0/0/0端口与192.168.1.0网段对应
|
||||
[Huawei-GigabitEthernet0/0/0]quit
|
||||
<Huawei>display ip routing-table
|
||||
|
||||
[Huawei]interface GigabitEthernet 0/0/1
|
||||
[Huawei-GigabitEthernet0/0/1]ip address 192.168.2.254 24 ## 0/0/1端口与192.168.2.0网段对应
|
||||
<Huawei>display ip routing-table
|
||||
```
|
||||
|
||||
- 查看路由表
|
||||
|
||||
|
||||
```
|
||||
<Huawei>display ip routing-table
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
2. #### 路由类型
|
||||
|
||||
1. 直连路由:配置路由器接口IP并为UP状态自动生成直连路由
|
||||
2. 非直连路由:
|
||||
- 静态路由:由网络管理员手动配置的路由信息。
|
||||
- 动态路由:通过运行路由协议(如RIP、OSPF、BGP等)自动获取和更新的路由信息。
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user