收藏 分享(赏)

H3C交换机配置-如何实现两个网段主机与外部通信1.doc

上传人:精品资料 文档编号:9723060 上传时间:2019-08-28 格式:DOC 页数:7 大小:43.50KB
下载 相关 举报
H3C交换机配置-如何实现两个网段主机与外部通信1.doc_第1页
第1页 / 共7页
H3C交换机配置-如何实现两个网段主机与外部通信1.doc_第2页
第2页 / 共7页
H3C交换机配置-如何实现两个网段主机与外部通信1.doc_第3页
第3页 / 共7页
H3C交换机配置-如何实现两个网段主机与外部通信1.doc_第4页
第4页 / 共7页
H3C交换机配置-如何实现两个网段主机与外部通信1.doc_第5页
第5页 / 共7页
点击查看更多>>
资源描述

1、H3C 交换机配置-如何实现两个网段主机与外部通信很 多 朋 友 多 次 提 到 交 换 机 的 配 置 , 提 到 如 何 实 现 两 个 网 段 主 机 与 外部 通 信 , 这 个 是 非 常 常 见 的 交 换 机 配 置 , 这 里 面 我 们 就 用 H3C 的 配置 来 了 解 下 这 个 过 程 。如 图 1 所 示 , 在 两 个 网 络 中 的 主 机 上 采 用 交 换 机 配 置 的 主 IP 地 址 和从 IP 地 址 作 为 网 关 , 实 现 两 个 网 段 的 主 机 都 可 以 通 过 Switch 与 外 部网 络 通 信 。图 1 IP 地 址 配 置 组

2、 网 图一 、 配 置 方 法 步 骤1. Switch 的 配 置# 配 置 VLAN 接 口 1 的 主 IP 地 址 和 从 IP 地 址 。system-viewSwitch interface vlan-interface 1Switch-Vlan-interface1 ip address 172.16.1.1 255.255.255.0Switch-Vlan-interface1 ip address 172.16.2.1 255.255.255.0 subSwitch-Vlan-interface1 return2. 主 机 的 配 置# 在 172.16.1.0/24 网 段

3、 中 的 主 机 上 配 置 网 关 为 172.16.1.1; 在 172.16.2.0/24 网段 中 的 主 机 上 配 置 网 关 为 172.16.2.1。3、 验 证 配 置# 使 用 ping 命 令 检 测 Switch 与 网 络 172.16.1.0/24 内 主 机 的 连 通 性 。ping 172.16.1.2PING 172.16.1.2: 56 data bytes, press CTRL_C to breakReply from 172.16.1.2: bytes=56 Sequence=1 ttl=255 time=25 msReply from 172.16

4、.1.2: bytes=56 Sequence=2 ttl=255 time=27 msReply from 172.16.1.2: bytes=56 Sequence=3 ttl=255 time=26 msReply from 172.16.1.2: bytes=56 Sequence=4 ttl=255 time=26 msReply from 172.16.1.2: bytes=56 Sequence=5 ttl=255 time=26 ms- 172.16.1.2 ping statistics -5 packet(s) transmitted5 packet(s) received

5、0.00% packet lossround-trip min/avg/max = 25/26/27 ms显 示 信 息 表 示 Switch 与 网 络 172.16.1.0/24 内 的 主 机 可 以 互 通 。# 使 用 ping 命 令 检 测 Switch 与 网 络 172.16.2.0/24 内 主 机 的 连 通 性 。ping 172.16.2.2PING 172.16.2.2: 56 data bytes, press CTRL_C to breakReply from 172.16.2.2: bytes=56 Sequence=1 ttl=255 time=25 msR

6、eply from 172.16.2.2: bytes=56 Sequence=2 ttl=255 time=26 msReply from 172.16.2.2: bytes=56 Sequence=3 ttl=255 time=26 msReply from 172.16.2.2: bytes=56 Sequence=4 ttl=255 time=26 msReply from 172.16.2.2: bytes=56 Sequence=5 ttl=255 time=26 ms- 172.16.2.2 ping statistics -5 packet(s) transmitted5 pa

7、cket(s) received0.00% packet lossround-trip min/avg/max = 25/25/26 ms显 示 信 息 表 示 Switch 与 网 络 172.16.2.0/24 内 的 主 机 可 以 互 通 。4、 配 置 文 件#interface Vlan-interface1ip address 172.16.1.1 255.255.255.0ip address 172.16.2.1 255.255.255.0 sub#二 、 举 例允 许 发 送 定 向 广 播 报 文 典 型 配 置 举 例如 图 2 所 示 , Host 通 过 网 关 S

8、witch, 将 定 向 广 播 发 往 Server 所 在 的 网 段 , 通 过 在交 换 机 上 配 置 允 许 发 送 定 向 广 播 报 文 , 使 得 Server 可 以 收 到 报 文 。图 2 允 许 发 送 定 向 广 播 报 文 配 置 组 网 图配 置 步 骤1、 配 置 Switch 的 配 置# 创 建 VLAN2, 并 将 端 口 GigabitEthernet1/0/1 加 入 到 VLAN2 中 。system-viewSwitch Vlan 2Switch-vlan2 port GigabitEthernet 1/0/1 Switch-Vlan2 quit

9、# 创 建 VLAN3, 并 将 端 口 GigabitEthernet1/0/2 加 入 到 VLAN3 中 。Switch Vlan 3Switch-vlan3 port GigabitEthernet 1/0/2SwitchVlan3 quit# 配 置 VLAN 接 口 3 和 VLAN 接 口 2 的 IP 地 址 。Switch interface vlan-interface 3Switch-Vlan-interface3 ip address 1.1.1.2 24Switch-Vlan-interface3 quitSwitch interface vlan-interface

10、 2Switch-Vlan-interface2 ip address 2.2.2.2 24# 配 置 允 许 VLAN 接 口 2 转 发 定 向 广 播 报 文 。Switch-Vlan-interface2 ip forward-broadcast2. 主 机 的 配 置配 置 网 关 为 Switch 的 VLAN 接 口 3 的 IP 地 址 。2.2.4 验 证 配 置# 配 置 完 成 以 后 , 在 Host 上 ping Switch 的 VLAN 接 口 2 所 在 子 网 网 段 的 广 播 地址 ( 2.2.2.255) 时 , Server 可 以 收 到 该 报 文

11、 。 取 消 掉 ip forward-broadcast 的 配置 , Server 不 能 收 到 该 报 文 。2.2.5 配 置 文 件#vlan 2 to 3#interface Vlan-interface2ip address 2.2.2.2 255.255.255.0ip forward-broadcast#interface Vlan-interface3ip address 1.1.1.2 255.255.255.0#interface GigabitEthernet1/0/1port link-mode bridgeport access vlan 2#interface GigabitEthernet1/0/2port link-mode bridgeport access vlan 3

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报