华为路由器配置IPV4和IPV6局域网示例

设计架构图及IP地址如下:PC1和PC2通过DHCP和DHCPV6获取IPV4和IPV6地址,实现图内的所有设备IPV4和IPV6全部互通。

1、IPV4 配置:

R2配置:
<Huawei>system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R2
[R2]interface GigabitEthernet 0/0/0
    
[R2-GigabitEthernet0/0/0]ip address 1.1.1.2 255.255.255.0
Aug 29 2024 08:55:40-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[R2-GigabitEthernet0/0/0]

R2配置静态路由
[R2]ip route-static 192.168.0.0 255.255.0.0 1.1.1.1


R1配置:
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R1
    
[R1]interface GigabitEthernet 0/0/0

[R1-GigabitEthernet0/0/0]ip address 1.1.1.1 255.255.255.0
[R1-GigabitEthernet0/0/0]
Aug 29 2024 08:57:00-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]interface G0/0/1
[R1-GigabitEthernet0/0/1]ip addr 192.168.1.254 255.255.255.0
Aug 29 2024 08:57:54-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[R1-GigabitEthernet0/0/1]interface G0/0/2
[R1-GigabitEthernet0/0/2]ip addr 192.168.2.254 255.255.255.0
Aug 29 2024 08:58:17-08:00 R1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 
[R1-GigabitEthernet0/0/2]

R1配置静态路由:
[R1]ip route-static 1.1.1.0 255.255.255.0  1.1.1.2

R1:配置DHCPV4
[R1]dhcp enable
[R1]ip pool 1 
Info: It's successful to create an IP address pool.

[R1-ip-pool-1]network 192.168.1.0 mask 255.255.255.0
    
[R1-ip-pool-1]gateway-list 192.168.1.254 
    
[R1-ip-pool-1]dns-list 223.5.5.5 119.29.29.29
    


[R1-ip-pool-1]excluded-ip-address 192.168.1.200 192.168.1.253

[R1]ip pool 2
Info: It's successful to create an IP address pool.
[R1-ip-pool-2]network 192.168.2.0 mask 255.255.255.0
[R1-ip-pool-2]gateway-list 192.168.2.254

[R1-ip-pool-2]dns-list 119.29.29.29 223.5.5.5


[R1-ip-pool-2]excluded-ip-address 192.168.2.200 192.168.2.253

[R1]interface GigabitEthernet 0/0/1
    
[R1-GigabitEthernet0/0/1]dhcp select global
    
[R1-GigabitEthernet0/0/1]interface G0/0/2
    
[R1-GigabitEthernet0/0/2]dhcp select global 


查看PC1和PC2的地址:
PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe81:39d0
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.199
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..................: 54-89-98-81-39-D0
DNS server........................: 223.5.5.5
                                    119.29.29.29
PC>ipconfig

Link local IPv6 address...........: fe80::5689:98ff:fe81:39d0
IPv6 address......................: :: / 128
IPv6 gateway......................: ::
IPv4 address......................: 192.168.1.199
Subnet mask.......................: 255.255.255.0
Gateway...........................: 192.168.1.254
Physical address..<
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

陪你听风

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值