你好,游客 登录 注册 搜索
背景:
阅读新闻

Oracle 管理之 Linux 网络基础

[日期:2013-02-16] 来源:blog.csdn.net/xiangsir  作者:xiangsir [字体:大 中 小]

重启网卡命令:
[root@asm ~]# ifup eth0:1
[root@asm ~]# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:8B:86:65 
          inet addr:192.168.8.162  Bcast:192.168.8.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:75 Base address:0x2000
         
[root@asm ~]# ifdown eth0:1
[root@asm ~]# ifconfig eth0:1
eth0:1    Link encap:Ethernet  HWaddr 00:0C:29:8B:86:65 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:75 Base address:0x2000
         
         
route 命令用于设置 Linux 系统的路由信息


查看路由信息:

 


[root@asm ~]# route -n
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
192.168.8.0    0.0.0.0        255.255.255.0  U    0      0        0 eth0
169.254.0.0    0.0.0.0        255.255.0.0    U    0      0        0 eth0
0.0.0.0        192.168.8.1    0.0.0.0        UG    0      0        0 eth0

 


添加静态路由条目


route add -net netaddress netmask gw ipaddr dev

 


添加默认网关


route add defalut gw ipaddr


删除一个路由条目


route del -net netaddr netmask gw ipaddr dev

 


网络诊断工具:


ping 命令可以通过 ICMP 协议对网络进行连接性测试


traceroute 命令可以追踪到达某个目的地所经过的路径


netstat 命令用于查看各种与网络相关的状态信息,其中包括:网络的链接状态、接口的统计信息
查看路由表、端口的监听情况等


[root@asm ~]# traceroute 192.168.8.162
traceroute to 192.168.8.162 (192.168.8.162), 30 hops max, 40 byte packets
 1  asm.Oracle.com (192.168.8.160)  3002.781 ms !H  3002.900 ms !H  3002.861 ms !H
[root@asm ~]# traceroute asm.oracle.com
traceroute to asm.oracle.com (192.168.8.160), 30 hops max, 40 byte packets
 1  asm.oracle.com (192.168.8.160)  0.300 ms  0.506 ms  0.033 ms
 
 诊断网络是否正常:
 wget 下载文件测试
 ping
 traceroute
 curl --head

linux
相关资讯       Oracle基础教程  Oracle管理  Linux网络基础 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款