<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[Centos/Linux下如何查看网关地址/Gateway地址]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Unix/LinuxC技术]]></category>
<pubDate>Wed, 21 Mar 2018 16:01:29 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	 Linux下查看网关的命令还是很多的，不过如果IP是DHCP获取，那么有些命令是不适用的，当然也有通用的查询网关命令.<br/>配置网关：<br/>vi /etc/sysconfig/network<br/>加入：<br/>GATEWAY=192.168.0.1<br/>完整的如下： <br/>NETWORKING=yes<br/>HOSTNAME=localhost.localdomain<br/>GATEWAY=192.168.0.1<br/><br/><br/>1.ifconfig -a 和 cat /etc/resolv.conf&nbsp;&nbsp;（主要查看ip/netmask和dns）<br/>2.netstat -rn<br/>3.cat /etc/sysconfig/network<br/>4.cat /etc/sysconfig/network-scripts/ifcfg-eth0<br/>5.traceroute 第一行就是自己的网关<br/>6.ip route show<br/>7.route -n<br/><br/>以上几个是比较常用的查询网关的命令。下面是范例：<br/><br/>[root@www.ctohome.com]# netstat -rn<br/>Kernel IP routing table<br/>Destination&nbsp;&nbsp;&nbsp;&nbsp; Gateway&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Genmask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Flags&nbsp;&nbsp; MSS Window&nbsp;&nbsp;irtt Iface<br/>184.82.152.96&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.255.248 U&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/>169.254.0.0&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.0.0&nbsp;&nbsp;&nbsp;&nbsp; U&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/>0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 184.82.152.97&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/><br/>[root@www.ctohome.com]# cat /etc/sysconfig/network-scripts/ifcfg-eth0<br/># Intel Corporation 82567V-2 Gigabit Network Connection<br/>DEVICE=eth0<br/>BOOTPROTO=none<br/>HWADDR=00:1c:c0:f8:a1:ac<br/>ONBOOT=yes<br/>NETMASK=255.255.255.248<br/>IPADDR=184.82.152.98<br/>GATEWAY=184.82.152.97<br/>TYPE=Ethernet <br/><br/><br/>[root@www.ctohome.com]# ip route show<br/>184.82.152.96/29 dev eth0&nbsp;&nbsp;proto kernel&nbsp;&nbsp;scope link&nbsp;&nbsp;src 184.82.152.98 <br/>169.254.0.0/16 dev eth0&nbsp;&nbsp;scope link <br/>default via 184.82.152.97 dev eth0<br/><br/><br/>[root@www.ctohome.com]# route -n<br/>Kernel IP routing table<br/>Destination&nbsp;&nbsp;&nbsp;&nbsp; Gateway&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Genmask&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Flags Metric Ref&nbsp;&nbsp;&nbsp;&nbsp;Use Iface<br/>184.82.152.96&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.255.248 U&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/>169.254.0.0&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 255.255.0.0&nbsp;&nbsp;&nbsp;&nbsp; U&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/>0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 184.82.152.97&nbsp;&nbsp; 0.0.0.0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; UG&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0 eth0<br/><br/> <br/>[root@www.ctohome.com]#&nbsp;&nbsp;ifconfig -a<br/>eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Link encap:Ethernet&nbsp;&nbsp;HWaddr 00:1C:C0:F8:A1:AC&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inet addr:184.82.152.98&nbsp;&nbsp;Bcast:184.82.152.103&nbsp;&nbsp;Mask:255.255.255.248<br/><br/>来自：http://www.360doc.com/content/14/0610/18/203871_385471759.shtml
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] Centos/Linux下如何查看网关地址/Gateway地址]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>