LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1396|回复: 2

usb 双机对联设置问题 GL620驱动(pc to pc)[ifconfig问题]

[复制链接]
发表于 2007-12-18 19:01:11 | 显示全部楼层 |阅读模式
在下的机器是  msi  i850主板 自带的 usb  pc to pc
是 GL620usb  以编译到内核中 (以模块形式)
以下是GL620的文档
  1. #! /bin/sh
  2. # host definitions
  3. HOSTA=some_ip_address_for_local_network (eg. 10.0.0.1 or 192.168.0.1)
  4. HOSTB=other_ip_address_for_local_network (eg. 10.0.0.2 or 192.168.0.2)
  5. # workaround bug in driver
  6. modprobe usbnet
  7. # wait for initialisation
  8. sleep 1
  9. # fire up
  10. /sbin/ifconfig usb0 $HOSTA pointopoint $HOSTB netmask 255.255.255.255
  11. /sbin/route add -host $HOSTA lo
  12. /sbin/route add $HOSTB usb0
  13. # Uncomment this line only if you don't use any better method to connect to Interner
  14. # In such case you can need some advanced technique (bridging of masquerading) or use proxy.
  15. # If you are using proxy and using Netscape browser, comment out this
  16. # line (bug in Netscape Browser causes timeouts while browsing offline).
  17. #/sbin/route add default gw utx
复制代码
文档全文   http://ftp.penguin.cz/pub/users/utx/linux-kernel/gl620usb.README

提示需要设置  PointToPoint 才能双机对联   在下从未设置过 不知这东西成功设置后是否如pppoe那样 会在ppp0后面提示  P-t-P:ip   这样的形式

这种设备在linux 上具体如何使用?   只需打开 dhcp 让本子连上就好?

现在问题主要击中在   ifconfig 中的pointtopoint 如何设置上(如何体现设置完成?)

麻烦各位了    :email:
发表于 2007-12-19 13:07:52 | 显示全部楼层
你需要检查一下你的内核有无point-to-point协议支持:
  1.   │ Symbol: PPP [=n]                                                                     │  
  2.   │ Prompt: PPP (point-to-point protocol) support                                        │  
  3.   │   Defined at drivers/net/Kconfig:2801                                                │  
  4.   │   Depends on: NETDEVICES                                                             │  
  5.   │   Location:                                                                          │  
  6.   │     -> Device Drivers                                                                │  
  7.   │       -> Network device support (NETDEVICES [=y])                                    │  
  8.   │   Selects: SLHC                                                                      │  
  9.   │   Selected by: IPWIRELESS_CS && HOTPLUG && PCMCIA                                    │  
  10.   │ │      < >   PPP (point-to-point protocol) support                                 │ │  
复制代码
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-19 13:47:21 | 显示全部楼层
Post by crquan;1797489
你需要检查一下你的内核有无point-to-point协议支持:


  1.   │ Symbol: PPP [=n]                                                                     │  
  2.   │ Prompt: PPP (point-to-point protocol) support                                        │  
  3.   │   Defined at drivers/net/Kconfig:2801                                                │  
  4.   │   Depends on: NETDEVICES                                                             │  
  5.   │   Location:                                                                          │  
  6.   │     -> Device Drivers                                                                │  
  7.   │       -> Network device support (NETDEVICES [=y])                                    │  
  8.   │   Selects: SLHC                                                                      │  
  9.   │   Selected by: IPWIRELESS_CS && HOTPLUG && PCMCIA                                    │  


  10.   │ │      < >   PPP (point-to-point protocol) support                                 │ │  

复制代码


貌似这个P-t-P  和  pppoe  是一个东西吧   我都编译到kernel里面了



现在的疑问是  usb0 这样的设备是否真的能使用  P-t-P 协议?

我lsmod 时能看到   这三条
gl620a                  2944  0
usbnet                 11912  1 gl620a
usbcore                89352  7 gl620a,usbnet,sl811_hcd,ohci_hcd,uhci_hcd,ehci_hcd
是否表示 驱动真的没有问题?!

我台式机eth0 是 192.168.0.1   usb0是 192.168.0.2
本子上设置的 192.168.0.4   GW是 192.168.0.1

是这样配的  PointoPoint
ifconfig usb0 192.168.0.2 pointopoint 192.168.0.1 netmask 255.255.255.255

ifconfig 输出如下  
  1. localhost ~ # ifconfig
  2. eth0      Link encap:Ethernet  HWaddr 00:0A:EB:22:56:BE  
  3.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  4.           RX packets:30028 errors:0 dropped:0 overruns:0 frame:0
  5.           TX packets:15683 errors:0 dropped:0 overruns:0 carrier:0
  6.           collisions:0 txqueuelen:1000
  7.           RX bytes:16556429 (15.7 Mb)  TX bytes:2021013 (1.9 Mb)
  8.           Interrupt:11 Base address:0xc000

  9. lo        Link encap:Local Loopback  
  10.           inet addr:127.0.0.1  Mask:255.0.0.0
  11.           UP LOOPBACK RUNNING  MTU:16436  Metric:1
  12.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  13.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  14.           collisions:0 txqueuelen:0
  15.           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

  16. ppp0      Link encap:Point-to-Point Protocol  
  17.           inet addr:121.69.226.184  P-t-P:121.69.226.1  Mask:255.255.255.255
  18.           UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
  19.           RX packets:15599 errors:0 dropped:0 overruns:0 frame:0
  20.           TX packets:15249 errors:0 dropped:0 overruns:0 carrier:0
  21.           collisions:0 txqueuelen:3
  22.           RX bytes:14376738 (13.7 Mb)  TX bytes:1659404 (1.5 Mb)

  23. usb0      Link encap:Ethernet  HWaddr 5A:8B:94:CF:8E:CF  
  24.           inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.255
  25.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  26.           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  27.           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  28.           collisions:0 txqueuelen:1000
  29.           RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)
复制代码

usb0 不能想ppp0 那样显示出  P-t-P:ipnum     使我停滞不前.........
这就是现在最大的问题

唉 郁闷
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表