Chinaunix首页 | 论坛 | 博客
  • 博客访问: 205120
  • 博文数量: 58
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 11
  • 用 户 组: 普通用户
  • 注册时间: 2014-09-02 01:08
文章分类
文章存档

2020年(1)

2018年(2)

2017年(1)

2016年(7)

2015年(31)

2014年(16)

我的朋友

分类:

2014-12-11 23:57:23

环回接法!
就是本地地址(交换机设备常用) 和交叉线 是一样的
1-3 接在一起(发送数据)
2-6 接在一起(接收数据)
形成通信!
获取的IP是类似本地127.0.0.0地址
或者私有IP 169.254.*.*;也可以通过电脑虚拟机DHCP分发IP
环回接法 电脑:“本地连接 ”是连接正常 非断开状态
这个时候“网卡”处于激活状态,可以内部虚拟机通讯,或者用双网卡和别的电脑通讯.

做一个特殊RJ45头。1 3,2 6 分别短接,插入到网卡的RJ45插座中去。
mii-tool可以看到网卡速率了。
开一个TCPDUMP抓包。
在另一个CONSOLE开一个PING程序,就可以看到网卡自己发出去的和回环的包了。


如果是要做千兆的用
1-3
2-6
4-7
5-8
做成后就只有一个头的。


本来想用来给虚拟机用,不过好像新版本的在网络不连接的情况下也可以正常工作。
唯一发现的一点就是。
未连接时不能ping通本机ip地址(非loopback地址ip127.),连上这个就可以了。
ref:

Make your own Ethernet Loopback connector

Occasionally I have the need for a network card to operate as though it has a live network connection, without it actually being connected to a network. Typically for testing purposes, and occasionally for specific software configurations. To do this I need a quick and easy way to make a loopback connector. Something small enough to keep in my PC toolkit, yet large enough that it won't be lost. Mine end up about the size of a ballpoint pen. The following is a quick "how to" for making an Ethernet loopback connector.

    To build this particular loopback connector you will need one (1) spare Category 5e (cat5) cable.
  1. Cut 4 or 5 inches of the end off of a network cable, keeping the connector intact.
  2. Cut away two inches of the main sheath covering the eight wires. (Be careful not to cut the wires inside.)
  3. Cut the sheath on Orange-White and Green-White and twist them together. Tape this pair. (Soldering is recommended)
  4. Cut the sheath on Green and Orange and twist them together. Tape this pair as well. (Soldering is recommended)
  5. Cut the sheath on Blue and Brown-White and twist them together. Tape this pair as well. (Soldering is recommended)
  6. Cut the sheath on Blue-White and Brown and twist them together. Tape this pair as well. (Soldering is recommended)
  7. Tape the end down to make it look presentable.
  8. Plug your new RJ-45 loopback into your Network Card.


阅读(1715) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~