Last login: Fri Oct 27 16:46:14 2017 from 192.168.1.168
[galen@sh45 ~]$ ls
anaconda2 jianshu_spider.py spider_school
ip route del default
Anaconda2-4.0.0-Linux-x86_64.sh spider_POI
ip route del default
[galen@sh45 ~]$ ip r
172.16.2.0/24 dev eth1 proto kernel scope link src 172.16.2.45
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.45
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
default via 172.16.2.44 dev eth1
[galen@sh45 ~]$ ip route del default
RTNETLINK answers: Operation not permitted
[galen@sh45 ~]$ sudo su -
[sudo] password for galen:
[root@sh45 ~]# cd
[root@sh45 ~]# pwd
/root
[root@sh45 ~]# ip route del default
[root@sh45 ~]# ip r
172.16.2.0/24 dev eth1 proto kernel scope link src 172.16.2.45
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.45
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
[root@sh45 ~]# ip route add default via 192.168.1.44
[root@sh45 ~]# curl ip.cn
當(dāng)前 IP:123.160.198.122 來自:河南省三門峽市 電信
[root@sh45 ~]# vi route_normal.sh
[root@sh45 ~]# vi route_pptp.sh
[root@sh45 ~]# ll
total 68
drwxr-xr-x 17 root root 4096 Aug 21 15:30 anaconda2
-rw-------. 1 root root 1299 Aug 18 03:25 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Aug 21 14:52 info
-rw-r--r--. 1 root root 28529 Aug 18 03:25 install.log
-rw-r--r--. 1 root root 7572 Aug 18 03:24 install.log.syslog
drwxr-xr-x 3 root root 4096 Aug 21 14:52 lib
-rw-r--r-- 1 root root 58 Oct 31 17:04 route_normal.sh
-rw-r--r-- 1 root root 59 Oct 31 17:05 route_pptp.sh
drwxr-xr-x 2 root root 4096 Aug 18 13:39 soft
[root@sh45 ~]# chmod +x route*
[root@sh45 ~]# ll
total 68
drwxr-xr-x 17 root root 4096 Aug 21 15:30 anaconda2
-rw-------. 1 root root 1299 Aug 18 03:25 anaconda-ks.cfg
drwxr-xr-x 2 root root 4096 Aug 21 14:52 info
-rw-r--r--. 1 root root 28529 Aug 18 03:25 install.log
-rw-r--r--. 1 root root 7572 Aug 18 03:24 install.log.syslog
drwxr-xr-x 3 root root 4096 Aug 21 14:52 lib
-rwxr-xr-x 1 root root 58 Oct 31 17:04 route_normal.sh
-rwxr-xr-x 1 root root 59 Oct 31 17:05 route_pptp.sh
drwxr-xr-x 2 root root 4096 Aug 18 13:39 soft
[root@sh45 ~]# ./route_normal.sh
[root@sh45 ~]# ip r
172.16.2.0/24 dev eth1 proto kernel scope link src 172.16.2.45
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.45
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
default via 192.168.1.1 dev eth0
[root@sh45 ~]# curl ip.cn
當(dāng)前 IP:101.81.127.20 來自:上海市 電信
[root@sh45 ~]# ./route_pptp.sh
[root@sh45 ~]# ip r
172.16.2.0/24 dev eth1 proto kernel scope link src 172.16.2.45
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.45
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
default via 192.168.1.44 dev eth0
[root@sh45 ~]# curl ip.cn
當(dāng)前 IP:115.202.52.157 來自:浙江省臺州市 電信
[root@sh45 ~]# ls
anaconda2 info install.log.syslog route_normal.sh soft
anaconda-ks.cfg install.log lib route_pptp.sh
[root@sh45 ~]#
ip route
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
- 文/潘曉璐 我一進(jìn)店門塘砸,熙熙樓的掌柜王于貴愁眉苦臉地迎上來节仿,“玉大人,你說我怎么就攤上這事掉蔬±认埽” “怎么了?”我有些...
- 文/不壞的土叔 我叫張陵女轿,是天一觀的道長挤忙。 經(jīng)常有香客問我,道長谈喳,這世上最難降的妖魔是什么册烈? 我笑而不...
- 正文 為了忘掉前任,我火速辦了婚禮婿禽,結(jié)果婚禮上赏僧,老公的妹妹穿的比我還像新娘。我一直安慰自己扭倾,他們只是感情好淀零,可當(dāng)我...
- 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著膛壹,像睡著了一般驾中。 火紅的嫁衣襯著肌膚如雪唉堪。 梳的紋絲不亂的頭發(fā)上,一...
- 文/蒼蘭香墨 我猛地睜開眼割卖,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了患雏?” 一聲冷哼從身側(cè)響起鹏溯,我...
- 正文 年R本政府宣布屑咳,位于F島的核電站,受9級特大地震影響弊琴,放射性物質(zhì)發(fā)生泄漏兆龙。R本人自食惡果不足惜,卻給世界環(huán)境...
- 文/蒙蒙 一敲董、第九天 我趴在偏房一處隱蔽的房頂上張望紫皇。 院中可真熱鬧,春花似錦腋寨、人聲如沸聪铺。這莊子的主人今日做“春日...
- 文/蒼蘭香墨 我抬頭看了看天上的太陽铃剔。三九已至撒桨,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間键兜,已是汗流浹背凤类。 一陣腳步聲響...
推薦閱讀更多精彩內(nèi)容
- Linux 使用 ip route , ip rule , iptables 配置策略路由 要求192.168.0...