您的位置:首页 > 运维架构 > Linux

linux/unix/windows环境查看本机的外网内网地址方法

2018-01-02 18:04 459 查看
命令行查询(详细):
UNIX/Linux: #curl cip.cc
Windows: >telnet cip.cc
>ftp cip.cc
命令行查询(纯ip):
UNIX/Linux: #curl ip.cip.cc


liunx环境的外网地址:

[webuser@10-6-X-95 gogoal_platform]$ curl cip.cc
IP: 104.xx.52.xx
地址: 中国  北京

数据二: 北京市 | 优刻得信息科技有限公司(UCloud)BGP数据中心

URL: http://www.cip.cc/104.xx.52.xx[/code] 
linux环境只查ip:

[webuser@10-6-X-95 gogoal_platform]$ curl ip.cip.cc
106.xx.52.xx


windows环境下查询外网IP:

IP      : 120.xx.175.xx
地址    : 中国  上海

数据二  : 上海市 | 上海数讯信息技术有限公司

URL     : http://www.cip.cc/120.xx.175.xx 
遗失对主机的连接。


查看内网地址:

[webuser@10-6-5-95 info]$ ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:C6:93:4F
inet addr:10.6.x.95  Bcast:10.6.255.255  Mask:255.255.0.0
inet6 addr: fe80::5054:ff:fec6:934f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:65147857978 errors:0 dropped:0 overruns:0 frame:0
TX packets:61683382103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:207034417274035 (188.2 TiB)  TX bytes:37998137187485 (34.5 TiB)

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:313258255 errors:0 dropped:0 overruns:0 frame:0
TX packets:313258255 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:136150961496 (126.8 GiB)  TX bytes:136150961496 (126.8 GiB)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: