首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >路由器可以平分和解析主机名,但是VLAN和交换机不能。

路由器可以平分和解析主机名,但是VLAN和交换机不能。
EN

Network Engineering用户
提问于 2019-12-25 05:01:25
回答 1查看 268关注 0票数 3

最近,我安装了一个AdtranNetvant4430,在一个带有一些VLAN间路由的网络上执行一些基本的VLAN,我遇到了一些奇怪的问题,可能是因为我对路由器缺乏经验。设置是在接口0/1上,我将上行链路连接到ONT,而在接口0/2上,它连接到交换机。我一定是在配置方面遗漏了什么,因为我能做的就是.

  • 为VLAN创建一个主干端口和访问端口
  • 从具有正确设置VLAN的端口上的路由器获取IP、DNS服务器、名称服务器、域
  • 来自路由器的Ping 8.8.8.8google.com

但是我不能..。

  • 平从电脑连接到外部开关,内部工作正常。
  • 查找DNS以获得名称解析
  • 开关上的Ping (Adtran Netvanta 1534)

那这会是什么?我有这个配置,我尝试过破坏IP路由(default-gateway以及其他一些我忘记了的东西),但都没有用。我还弄乱了访问控制列表,当我试图应用它们时,我会得到一个错误,上面写着Error: you must first assign an IPv4 address,这可能是相关的。这个交换机是一个非常基本的设置(对于每个端口、switchport access vlan (blah)和一个switchport mode trunk),但在我看来,路由器有点让人困惑,因为这是我第一次设置它--我做了大量的阅读和研究,我讨厌寻求帮助,它看上去像是“我不明白它,帮我修复我的配置”(我不想这么做)。但是我现在很茫然,任何帮助都是非常感谢的!

代码语言:javascript
复制
Building configuration...
!
!
! ADTRAN, Inc. OS version 18.01.03.00
! Boot ROM version 17.04.01.00
! Platform: NetVanta 4430, part number 1700630E1
! Serial number LBADTNXXXXXXXX
!
!
hostname "Router"
no enable password
!
clock timezone -8
clock no-auto-correct-DST 
!
ip subnet-zero
ip classless
ip routing
ipv6 unicast-routing
!
!
ip name-server 8.8.8.8 8.8.4.4 
!       
!
no auto-config
!
no event-history
no logging forwarding
no logging email
!
no service password-encryption
!
!
!
ip firewall
no ip firewall alg msn
no ip firewall alg mszone
no ip firewall alg h323
!
!
!
!
!
!
!       
!
!
no dot11ap access-point-control
!
!
!
!
ip dhcp-server excluded-address 10.10.3.1 10.10.3.3
ip dhcp-server excluded-address 10.10.10.1 10.10.10.15
!
ip dhcp-server pool “VLAN3”
  network 10.10.3.0 255.255.255.192
  domain-name “vlan3.com"
  dns-server 8.8.8.8 (ISP Provided DNS)
  default-router 10.10.3.1
!
ip dhcp-server pool “VLAN2”
  network 10.10.10.0 255.255.255.0
  default-router 10.10.10.1
!
ip dhcp-server pool “VLAN4”
  network 192.168.5.0 255.255.255.0
  domain-name “vlan4.com"
  dns-server 8.8.8.8 (ISP Provided DNS)
  default-router 192.168.5.1
!
ip dhcp-server pool “VLAN5”
  network 10.10.5.0 255.255.255.192
  domain-name “vlan5.com"
  dns-server 8.8.8.8 (ISP Provided DNS)
  default-router 10.10.5.1
!
ip dhcp-server pool “VLAN6”
  network 10.10.6.0 255.255.255.0
  domain-name “vlan6.com”
  dns-server 8.8.8.8 (ISP Provided DNS)
  default-router 10.10.6.1
!
ip dhcp-server pool "Canon 1”
  default-router 192.168.5.1
  host 192.168.5.234 255.255.255.0
  hardware-address
f4:a9:97:xx:xx:xx ethernet
!
ip dhcp-server pool “printer2”
  default-router 192.168.5.1
  host 192.168.5.201 255.255.255.0
  hardware-address 84:ba:3b:xx:xx:xx ethernet
!
ip dhcp-server pool "C5550"
!
!
!
!
!
!
!
no ethernet cfm
!
interface eth 0/1
  no ip address
  shutdown
!
!
!
interface gigabit-eth 0/1
  ip address  (EXTERNAL IP) 255.255.255.252 
  no shutdown
!
!       
interface gigabit-eth 0/2
  encapsulation 802.1q
  no shutdown
!
interface gigabit-eth 0/2.2
  description BLAH
  vlan-id 2
  ip address  10.10.10.1  255.255.255.0 
  no shutdown
interface gigabit-eth 0/2.3
  description BLAH
  vlan-id 3
  ip address  10.10.3.1  255.255.255.192 
  no shutdown
interface gigabit-eth 0/2.4
  description BLAH
  vlan-id 4
  ip address  192.168.5.1  255.255.255.0 
  no shutdown
interface gigabit-eth 0/2.5
  description BLAH
  vlan-id 5
  ip address  10.10.5.1  255.255.255.192 
  no shutdown
interface gigabit-eth 0/2.6
  description BLAH
  vlan-id 6
  ip address  10.10.6.1  255.255.255.0 
  no shutdown
!
!
!
!
!
!
!
!
!
ip access-list extended PermitAny
  permit ip any  any    
!
ip access-list extended printers
  permit ip 10.10.3.0 0.0.0.192  host 192.168.5.0    
  permit ip 10.10.2.0 0.0.0.255  192.168.5.0 0.0.0.255    
  permit ip 10.10.6.0 0.0.0.255  192.168.5.0 0.0.0.255    
  permit ip 10.10.3.0 0.0.0.192  192.168.5.0 0.0.0.255    
!
!
!
!
ip policy-class print
  allow list printers
  nat source list PermitAny interface gigabit-ethernet 0/1 overload
!
!
!
ip route 0.0.0.0 0.0.0.0 (GATEWAY OF ONT)
!
no tftp server
no tftp server overwrite
no ip http server
no ip http secure-server
no ip snmp agent
no ip ftp server
ip ftp server default-filesystem flash
no ip scp server
no ip sntp server
!
!       
!
!
!
!
!
!
ip sip udp 5060
ip sip tcp 5060
!
!
!
!
!
!
!
!
!
!
!
!
!
!
line con 0
  no login
!
line telnet 0 4
  login
  no shutdown
line ssh 0 4
  login local-userlist
  no shutdown
!
!
!
!
!
end```
EN

回答 1

Network Engineering用户

回答已采纳

发布于 2019-12-25 18:58:50

您没有为您的私有到公共地址配置NAT,因此您的数据包将被丢弃在公共Internet上。互联网服务供应商已同意不传送带有私密地址的封包。

不幸的是,我不太确定如何在你的Adtran设备上做到这一点。语法看起来类似Cisco IOS,但有一些不同之处,因此我不知道Cisco NAT配置语法是否真正适用于您的设备。

票数 3
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/64199

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档