两台路由之间不同网段互访的配置学习
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
两台路由之间不同网段互访的配置学习,
目的保证两端PC网络通信,主要是静态路由的理解方式:目的地之到那个出口
ip route-static 目的地址段子网掩码到那个出口
上图:
左侧路由R1配置如下:
[Huawei]dis cur
#
sysname Huawei
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher oN/"#"~FaFZypQCee$t3G7J# local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
ip address 192.168.1.2 255.255.255.0
#
interface Ethernet0/0/1
ip address 172.16.0.1 255.255.255.0
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 192.168.2.0 255.255.255.0 192.168.1.3 #
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
Return
右侧路由配置如下:
[Huawei]dis cur
#
sysname Huawei
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher ~A~wX{Z9fF3IF$':[285k7I# local-user admin service-type http
#
firewall zone Local
priority 16
#
interface Ethernet0/0/0
ip address 192.168.1.3 255.255.255.0
#
interface Ethernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
interface Serial0/0/0
link-protocol ppp
#
interface Serial0/0/1
link-protocol ppp
#
interface Serial0/0/2
link-protocol ppp
#
interface Serial0/0/3
link-protocol ppp
#
interface GigabitEthernet0/0/0
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
#
interface GigabitEthernet0/0/3
#
wlan
#
interface NULL0
#
ip route-static 172.16.0.0 255.255.255.0 192.168.1.2
#
user-interface con 0
user-interface vty 0 4
user-interface vty 16 20
#
return