[已解决]关于校内PT的问题

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
wgj
帖子: 294
注册时间: 2007-06-02 20:00

[已解决]关于校内PT的问题

#1

帖子 wgj » 2014-04-13 10:03

话说我的学校有一帮学长搭了一个内网PT用来在学校内部分享资源,不走校外流量。原本宿舍使用路由器上网的。后来因为某种原因使用了交换机。现在就无法连接PT了
一下是我们学校的PT使用说明:
论你宿舍能不能上网,只要你买根网线,网线一头插墙上网口,一头插电脑,输入PT网址:pt.sdust.edu.cn 就可以使用PT了,无需向团委申请快通账号。无需任何上网方式,支持任何交换机。宿舍插上网线就可以用。

如果使用路由器,路由器设置里的“wan设置~第二连接~“动态IP”要打开(路由器设置:连接路由后,浏览器地址栏里输入192.168.1.1,账号密码见路由器背面)。
你的电脑或者路由器会获得一个10.50.X.X的免流量IP地址,只要网页右上角的悬浮窗提示:您正通过免流量通道访问PT。就可以正常使用海天PT下载了。
现在Linux通过系统自带的DSL连接上网,如果通过DSL上网,则会获得一个10.248.*.*的IP无法进入PT,而通过DHCP自动获取IP就可以得到10.50.*.*的IP地址,可以进入海天PT但是无法连接外网。
windows下正常。
问过我们学校的管理员,他表示没用过linux,不了解。。。 :em20
求大神解决。
P.S.1:话说路由器里运行的许多都是Linux,那第二连接功能是通过什么命令实现的?? :em03
附件
一键连线3.0.rar
windows脚本,据说windows下有部分连不上的可以使用这个。我表示看不懂。
(578 Bytes) 已下载 84 次
上次由 wgj 在 2014-04-20 15:05,总共编辑 1 次。
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#2

帖子 wgj » 2014-04-13 10:13

补充一下ifconfig的信息:
eth1 Link encap:以太网 硬件地址 ec:55:f9:e3:b1:6f
inet 地址:10.255.213.191 广播:10.255.223.255 掩码:255.255.240.0
inet6 地址: fe80::ee55:f9ff:fee3:b16f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:9660 错误:0 丢弃:0 过载:0 帧数:1384286
发送数据包:130 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:808399 (808.3 KB) 发送字节:30551 (30.5 KB)
中断:17

eth2 Link encap:以太网 硬件地址 5c:f9:dd:65:13:89
inet6 地址: fe80::5ef9:ddff:fe65:1389/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 跃点数:1
接收数据包:51609 错误:0 丢弃:1 过载:0 帧数:0
发送数据包:32717 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:1000
接收字节:38117861 (38.1 MB) 发送字节:4186656 (4.1 MB)

lo Link encap:本地环回
inet 地址:127.0.0.1 掩码:255.0.0.0
inet6 地址: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 跃点数:1
接收数据包:2612 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:2612 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:0
接收字节:443840 (443.8 KB) 发送字节:443840 (443.8 KB)

ppp0 Link encap:点对点协议
inet 地址:10.248.26.195 点对点:10.248.24.1 掩码:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 跃点数:1
接收数据包:33424 错误:0 丢弃:0 过载:0 帧数:0
发送数据包:32504 错误:0 丢弃:0 过载:0 载波:0
碰撞:0 发送队列长度:3
接收字节:35858639 (35.8 MB) 发送字节:3460186 (3.4 MB)
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于校内PT的问题

#3

帖子 poloshiao » 2014-04-14 11:18

现在Linux通过系统自带的DSL连接上网,如果通过DSL上网,则会获得一个10.248.*.*的IP无法进入PT,而通过DHCP自动获取IP就可以得到10.50.*.*的IP地址,可以进入海天PT但是无法连接外网。
1. 通过DSL上网,则会获得一个10.248.*.*的IP无法进入PT
這個時候
sudo route -nv
把結果直接複製 貼上來
2. 通过DHCP自动获取IP就可以得到10.50.*.*的IP地址,可以进入海天PT但是无法连接外网。
這個時候
sudo route -nv
把結果直接複製 貼上來
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: 关于校内PT的问题

#4

帖子 astolia » 2014-04-14 13:00

这东西建立个虚拟网卡,设成DHCP方式获取IP,最多再设置一下路由表就可以了。

这有个建立虚拟网卡的简单教程,但他用的是静态IP,不知道这种对DHCP行不行
http://my.oschina.net/davisqi/blog/80401

如果这种简单的不行,那就再试试TUN/TAP的
http://blog.renren.com/share/362056848/9784426919
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#5

帖子 wgj » 2014-04-16 18:47

poloshiao 写了:
现在Linux通过系统自带的DSL连接上网,如果通过DSL上网,则会获得一个10.248.*.*的IP无法进入PT,而通过DHCP自动获取IP就可以得到10.50.*.*的IP地址,可以进入海天PT但是无法连接外网。
1. 通过DSL上网,则会获得一个10.248.*.*的IP无法进入PT
這個時候
sudo route -nv
把結果直接複製 貼上來
2. 通过DHCP自动获取IP就可以得到10.50.*.*的IP地址,可以进入海天PT但是无法连接外网。
這個時候
sudo route -nv
把結果直接複製 貼上來
DSL:
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 10.248.36.1 0.0.0.0 UG 0 0 0 ppp0
10.248.36.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0

dhcp:
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
10.48.0.0 10.50.28.1 255.248.0.0 UG 0 0 0 eth2
10.50.28.0 0.0.0.0 255.255.252.0 U 1 0 0 eth2
10.255.192.0 10.50.28.3 255.255.192.0 UG 0 0 0 eth2
192.168.100.245 10.50.28.3 255.255.255.255 UGH 0 0 0 eth2



谢谢
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#6

帖子 wgj » 2014-04-16 19:22

我也不清楚。这个东西。我看了一下同学的windows系统。
宽带连接上的网络IP是10.248.x.x而本地连接上IP是10.50.x.x。
也即是说windows下pppoe和本地连接都是同时启用的。而linux下正如ifconfig信息现实的。eth2获取了ipv6的地址。。为获取ipv4的(10.50.x.x)
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于校内PT的问题

#7

帖子 poloshiao » 2014-04-16 21:01

ppp0 Link encap:点对点协议
inet 地址:10.248.26.195 点对点:10.248.24.1 掩码:255.255.255.255
DSL:
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
0.0.0.0 10.248.36.1 0.0.0.0 UG 0 0 0 ppp0
10.248.36.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
這個 路由 有點奇怪
1. 從終端機
1-1. ping -c 3 127.0.0.1
1-2. ping -c 3 10.248.26.195
1-3. ping -c 3 10.248.36.1
1-4. tracepath 10.248.36.1
把結果直接複製貼上來 (不必擷圖)
eth1 Link encap:以太网 硬件地址 ec:55:f9:e3:b1:6f
inet 地址:10.255.213.191 广播:10.255.223.255 掩码:255.255.240.0
eth2 Link encap:以太网 硬件地址 5c:f9:dd:65:13:89
inet6 地址: fe80::5ef9:ddff:fe65:1389/64 Scope:Link
2. eth2 沒有 inet 地址: 這一行 ?
dhcp:
内核 IP 路由表
目标 网关 子网掩码 标志 跃点 引用 使用 接口
10.48.0.0 10.50.28.1 255.248.0.0 UG 0 0 0 eth2
10.50.28.0 0.0.0.0 255.255.252.0 U 1 0 0 eth2
10.255.192.0 10.50.28.3 255.255.192.0 UG 0 0 0 eth2
192.168.100.245 10.50.28.3 255.255.255.255 UGH 0 0 0 eth2
同一個網卡 為何會有
10.50.28.1
10.50.28.3
兩個网关 (同一個 subnet) ?
3. 從終端機
3-1. ping -c 3 127.0.0.1
3-2. ping -c 3 10.50.28.1
3-3. ping -c 3 10.50.28.3
3-4. ping -c 3 192.168.100.245
3-5. ping -b -c 3 10.48.0.0
3-6. ping -b -c 3 10.50.28.0
3-7. ping -b -c 3 10.255.192.0
3-8. tracepath 10.248.36.3
3-9. tracepath 10.248.36.1
把結果直接複製貼上來 (不必擷圖)
我们学校的PT使用说明:
论你宿舍能不能上网,只要你买根网线,网线一头插墙上网口,一头插电脑,输入PT网址:pt.sdust.edu.cn 就可以使用PT了,无需向团委申请快通账号。无需任何上网方式,支持任何交换机。宿舍插上网线就可以用。
4. 有沒有 網際網路可以存取如何設定的網頁?
如果有 請提供 網址

5. 你是在 桌面右上方圖示 nm_applet 設定 還是在 /etc/network/interfaces 設定 連線 ?
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#8

帖子 wgj » 2014-04-17 10:17

代码: 全选

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.046 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.061 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.067 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.046/0.058/0.067/0.008 ms

代码: 全选

PING 10.248.26.195 (10.248.26.195) 56(84) bytes of data.
64 bytes from 10.248.26.195: icmp_seq=1 ttl=64 time=1.32 ms
64 bytes from 10.248.26.195: icmp_seq=2 ttl=64 time=1.14 ms
64 bytes from 10.248.26.195: icmp_seq=3 ttl=64 time=1.17 ms

--- 10.248.26.195 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 1.140/1.211/1.322/0.079 ms

代码: 全选

PING 10.248.36.1 (10.248.36.1) 56(84) bytes of data.
64 bytes from 10.248.36.1: icmp_seq=1 ttl=64 time=1.03 ms
64 bytes from 10.248.36.1: icmp_seq=2 ttl=64 time=0.479 ms
64 bytes from 10.248.36.1: icmp_seq=3 ttl=64 time=0.787 ms

--- 10.248.36.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 0.479/0.765/1.030/0.226 ms

代码: 全选

10.248.32.175                                         0.217ms pmtu 1492
 1:  no reply
 2:  no reply
 3:  no reply
 4:  no reply
 5:  no reply
 6:  no reply
 7:  no reply
 8:  no reply
 9:  no reply
10:  no reply
11:  no reply
12:  no reply
13:  no reply
14:  no reply
15:  no reply
16:  no reply
17:  no reply
18:  no reply
19:  no reply
20:  no reply
21:  no reply
22:  no reply
23:  no reply
24:  no reply
25:  no reply
26:  no reply
27:  no reply
28:  no reply
29:  no reply
30:  no reply
31:  no reply
     Too many hops: pmtu 1492
     Resume: pmtu 1492 
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#9

帖子 wgj » 2014-04-17 10:25

代码: 全选

PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.048 ms
64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.059 ms
64 bytes from 127.0.0.1: icmp_seq=3 ttl=64 time=0.058 ms

--- 127.0.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.048/0.055/0.059/0.005 ms

代码: 全选

PING 10.50.28.1 (10.50.28.1) 56(84) bytes of data.
64 bytes from 10.50.28.1: icmp_seq=1 ttl=255 time=1.02 ms
64 bytes from 10.50.28.1: icmp_seq=2 ttl=255 time=1.60 ms
64 bytes from 10.50.28.1: icmp_seq=3 ttl=255 time=1.23 ms

--- 10.50.28.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 1.029/1.291/1.606/0.238 ms

代码: 全选

PING 10.50.28.3 (10.50.28.3) 56(84) bytes of data.
64 bytes from 10.50.28.3: icmp_seq=1 ttl=64 time=0.607 ms
64 bytes from 10.50.28.3: icmp_seq=2 ttl=64 time=0.336 ms
64 bytes from 10.50.28.3: icmp_seq=3 ttl=64 time=0.320 ms

--- 10.50.28.3 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.320/0.421/0.607/0.131 ms

代码: 全选

PING 192.168.100.245 (192.168.100.245) 56(84) bytes of data.


--- 192.168.100.245 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms

代码: 全选

PING 10.48.0.0 (10.48.0.0) 56(84) bytes of data.

--- 10.48.0.0 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2017ms

代码: 全选

WARNING: pinging broadcast address
PING 10.50.28.0 (10.50.28.0) 56(84) bytes of data.


--- 10.50.28.0 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2016ms

代码: 全选

PING 10.255.192.0 (10.255.192.0) 56(84) bytes of data.

--- 10.255.192.0 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2014ms

代码: 全选

tracepath 10.248.36.3
 1:  send failed
     Resume: pmtu 65535 

代码: 全选

tracepath 10.248.36.1
 1:  send failed
     Resume: pmtu 65535 
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#10

帖子 wgj » 2014-04-17 10:27

4. 有沒有 網際網路可以存取如何設定的網頁?
如果有 請提供 網址
这个好像没有。
5. 你是在 桌面右上方圖示 nm_applet 設定 還是在 /etc/network/interfaces 設定 連線 ?
使用的是nm_applet。

谢谢。 :em01
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于校内PT的问题

#11

帖子 poloshiao » 2014-04-17 19:06

tracepath 10.248.36.1
原來指令
10.248.32.175 0.217ms pmtu 1492
你這個 IPv4
10.248.32.175
哪來的 ?
PING 192.168.100.245 (192.168.100.245) 56(84) bytes of data.
--- 192.168.100.245 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2015ms
你這個 IPv4
192.168.100.245
哪來的 ?
PING 10.48.0.0 (10.48.0.0) 56(84) bytes of data.
--- 10.48.0.0 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2017ms
3-5. ping -b -c 3 10.48.0.0
你是不是少加了 -b 參數 ?
PING 10.255.192.0 (10.255.192.0) 56(84) bytes of data.
--- 10.255.192.0 ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2014ms
3-7. ping -b -c 3 10.255.192.0
你是不是少加了 -b 參數 ?
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#12

帖子 wgj » 2014-04-18 12:30

我也不知道。。。 前者是在DSL下ping的,后者是在DHCP下ping的:em20
-b参数加了。就是ping不通啊。。。。 :em06
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#13

帖子 wgj » 2014-04-19 22:22

这东西建立个虚拟网卡,设成DHCP方式获取IP,最多再设置一下路由表就可以了。

这有个建立虚拟网卡的简单教程,但他用的是静态IP,不知道这种对DHCP行不行
http://my.oschina.net/davisqi/blog/80401

如果这种简单的不行,那就再试试TUN/TAP的
http://blog.renren.com/share/362056848/9784426919
我感觉eth2能获取ipv4地址就可以了.结果.... :em06

代码: 全选

 sudo ifconfig eth2 up dhclient eth2
得到的竟然是这个ip

代码: 全选

inet 地址:123.129.254.15  广播:123.255.255.255  掩码:255.0.0.0
一查好像是公网的ip.....
话说有人知道路由的第二连接是怎么实现的? :em20
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于校内PT的问题

#14

帖子 poloshiao » 2014-04-20 10:49

使用的是nm_applet。
1. 把 /etc/network/interfaces 中 只保留 以下兩行
auto lo
iface lo inet loopback

其它都刪除 以免作怪

2. 你的 route 裡頭 有一些東西
可能是你歷次試驗留下的痕跡
參考
http://manpages.ubuntu.com/manpages/tru ... ute.8.html
使用
sudo route del ...
可以把這些歷史紀錄刪除
有時 全部清空路由 重開機 會有意外發現
sudo route add ...
可以手動增加需要的路由

3. 參考別人成功的案例
無論 windows ubuntu 或 其它作業系統 都行
主要架構大同小異 稍微微調即可
上次由 poloshiao 在 2014-04-20 14:13,总共编辑 1 次。
wgj
帖子: 294
注册时间: 2007-06-02 20:00

Re: 关于校内PT的问题

#15

帖子 wgj » 2014-04-20 13:41

谢谢,解决了....
首先直接DHCP. route -nv 获取路由表

代码: 全选

内核 IP 路由表
目标            网关            子网掩码        标志  跃点   引用  使用 接口
10.48.0.0       10.50.28.1      255.248.0.0     UG    0      0        0 eth2
10.50.28.0      0.0.0.0         255.255.252.0   U     1      0        0 eth2
10.255.192.0    10.50.28.3      255.255.192.0   UG    0      0        0 eth2
192.168.100.245 10.50.28.3      255.255.255.255 UGH   0      0        0 eth2
然后ifconfig得到获取的IP.....

代码: 全选

eth2      Link encap:以太网  硬件地址 5c:f9:dd:65:13:89  
          inet 地址:10.50.28.107  广播:10.50.31.255  掩码:255.255.252.0
          inet6 地址: fe80::5ef9:ddff:fe65:1389/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  跃点数:1
          接收数据包:567871 错误:0 丢弃:1 过载:0 帧数:0
          发送数据包:287427 错误:0 丢弃:0 过载:0 载波:0
          碰撞:0 发送队列长度:1000 
          接收字节:193501991 (193.5 MB)  发送字节:33983793 (33.9 MB)

然后重连DSL
使用

代码: 全选

sudo ifconfig eth2 10.50.28.107 netmask 255.255.252.0
强制设置IP.....
然后使用

代码: 全选

sudo route add -net 192.168.100.245 netmask 255.255.255.255 gw 10.50.28.3
一条条加进去..... :em20
终于完了....
上述操作写个脚本就行了,但是不能动态获取IP很蛋痛...就怕IP冲突....
谢谢poloshiao和astolia
回复