Chinaunix首页 | 论坛 | 博客
  • 博客访问: 101453938
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-05-17 11:01:52

作者: panaiec  出自:
今天,需要建立一个dblink,但一直没有成功,于是检查网络:

因为屏蔽了ping,所以用telnet试试:

[root@localhost root]# telnet 172.0.2.90
Trying 172.0.2.90...
telnet: connect to address 172.0.2.90: No route to host

看来是网络的问题。检查一下网卡的路由走向:

[root@localhost root]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.96.54.0 * 255.255.255.128 U 0 0 0 eth1
172.25.0.0 * 255.255.0.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth1
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 202.96.54.1 0.0.0.0 UG 0 0 0 eth1

发现没有为172.0网段配置路由,也没有为eth0配置默认路由(eth0是内网网卡、eth1是外网网卡)

为eth0手工配置静态路由:

[root@localhost root]# route add -net 172.0.0.0 netmask 255.255.0.0 gw 172.25.13.1 eth0

此时路由走向状况是:

[root@localhost root]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
202.96.54.0 0.0.0.0 255.255.255.128 U 0 0 0 eth1
172.25.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
172.0.0.0 172.25.13.1 255.255.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 202.96.54.1 0.0.0.0 UG 0 0 0 eth1

再用telnet测试连接:

[root@localhost root]# route add -net 172.0.0.0 netmask 255.255.0.0 gw 172.25.13.1 eth0
[root@localhost root]# telnet 172.0.2.90
Trying 172.0.2.90...
Connected to 172.0.2.90.
Escape character is '^]'.

可见,网络已经是连通的了,dblink也可以正常访问数据了。
阅读(657) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~