ubuntu20.04 雙網卡 pppoe + 固定ip - Linux
By Madame
at 2022-04-04T20:29
at 2022-04-04T20:29
Table of Contents
各位前輩好
小弟我最近有個需求是想把一台電腦當proxy
申請了中華的pppoe加上 中嘉寬頻的固定ip
主機版的網卡接中華pppoe的線
PCIE的網卡接中嘉的線
eno1是主機版的網卡
enp4s0是pcie的tplink網卡
我在網路上查了一些文章自己試了很久還是搞不太懂
為什麼其中一個對外可以通另一個就會不能通?
想請教各位前輩有沒有什麼解決方法?
提供資訊如下
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eno1
168.95.98.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
192.168.1.1 0.0.0.0 255.255.255.255 UH 100 0 0 eno1
204.205.229.0 0.0.0.0 255.255.255.0 U 0 0 0 enp4s0
204.205.229.101 0.0.0.0 255.255.255.255 UH 0 0 0 enp4s0
ifconfig
eno1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 192.168.1.104 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2001:b011:3800:1c1e:b62e:99ff:fe92:55 prefixlen 64 scopeid
0x0<global>
inet6 fe80::b62e:99ff:fe92:55 prefixlen 64 scopeid 0x20<link>
ether b4:2e:99:92:00:55 txqueuelen 1000 (Ethernet)
RX packets 115409 bytes 10948484 (10.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71254 bytes 9361504 (9.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 204.205.229.101 netmask 255.255.255.0 broadcast 204.205.229.255
inet6 fe80::b6b0:24ff:fed2:5d3 prefixlen 64 scopeid 0x20<link>
ether b4:b0:24:d2:05:d3 txqueuelen 1000 (Ethernet)
RX packets 51126 bytes 9584453 (9.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134724 bytes 17830947 (17.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2584173 bytes 3568710276 (3.5 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2584173 bytes 3568710276 (3.5 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1492
inet 114.232.129.195 netmask 255.255.255.255 destination
168.95.98.254
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 31044 bytes 1719871 (1.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55952 bytes 6333108 (6.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
--
小弟我最近有個需求是想把一台電腦當proxy
申請了中華的pppoe加上 中嘉寬頻的固定ip
主機版的網卡接中華pppoe的線
PCIE的網卡接中嘉的線
eno1是主機版的網卡
enp4s0是pcie的tplink網卡
我在網路上查了一些文章自己試了很久還是搞不太懂
為什麼其中一個對外可以通另一個就會不能通?
想請教各位前輩有沒有什麼解決方法?
提供資訊如下
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
0.0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eno1
168.95.98.254 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
192.168.1.1 0.0.0.0 255.255.255.255 UH 100 0 0 eno1
204.205.229.0 0.0.0.0 255.255.255.0 U 0 0 0 enp4s0
204.205.229.101 0.0.0.0 255.255.255.255 UH 0 0 0 enp4s0
ifconfig
eno1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
inet 192.168.1.104 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 2001:b011:3800:1c1e:b62e:99ff:fe92:55 prefixlen 64 scopeid
0x0<global>
inet6 fe80::b62e:99ff:fe92:55 prefixlen 64 scopeid 0x20<link>
ether b4:2e:99:92:00:55 txqueuelen 1000 (Ethernet)
RX packets 115409 bytes 10948484 (10.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71254 bytes 9361504 (9.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
enp4s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 204.205.229.101 netmask 255.255.255.0 broadcast 204.205.229.255
inet6 fe80::b6b0:24ff:fed2:5d3 prefixlen 64 scopeid 0x20<link>
ether b4:b0:24:d2:05:d3 txqueuelen 1000 (Ethernet)
RX packets 51126 bytes 9584453 (9.5 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 134724 bytes 17830947 (17.8 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 2584173 bytes 3568710276 (3.5 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2584173 bytes 3568710276 (3.5 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1492
inet 114.232.129.195 netmask 255.255.255.255 destination
168.95.98.254
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 31044 bytes 1719871 (1.7 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 55952 bytes 6333108 (6.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
--
Tags:
Linux
All Comments
By Selena
at 2022-04-05T06:34
at 2022-04-05T06:34
By Jacob
at 2022-04-05T16:40
at 2022-04-05T16:40
By Kelly
at 2022-04-06T02:45
at 2022-04-06T02:45
By Lydia
at 2022-04-06T12:50
at 2022-04-06T12:50
By Edith
at 2022-04-06T22:56
at 2022-04-06T22:56
By Jake
at 2022-04-07T09:01
at 2022-04-07T09:01
By Lucy
at 2022-04-07T19:07
at 2022-04-07T19:07
By Lily
at 2022-04-08T05:12
at 2022-04-08T05:12
By Kristin
at 2022-04-08T15:17
at 2022-04-08T15:17
By Tristan Cohan
at 2022-04-09T01:23
at 2022-04-09T01:23
By Poppy
at 2022-04-09T11:28
at 2022-04-09T11:28
By Jake
at 2022-04-09T21:33
at 2022-04-09T21:33
By Hedy
at 2022-04-10T07:39
at 2022-04-10T07:39
By Dora
at 2022-04-10T17:44
at 2022-04-10T17:44
By Ingrid
at 2022-04-11T03:50
at 2022-04-11T03:50
Related Posts
hdparm 的效能疑問
By Eden
at 2022-04-04T16:52
at 2022-04-04T16:52
postfix 憑證過期訊息
By Tom
at 2022-03-31T09:25
at 2022-03-31T09:25
遠端SSH Linux server,X11無法work
By Jacob
at 2022-03-30T18:06
at 2022-03-30T18:06
架站DNS問題
By Catherine
at 2022-03-29T21:52
at 2022-03-29T21:52
ansible 問題請教
By Elma
at 2022-03-29T21:02
at 2022-03-29T21:02