Marco ( @mgua )
PS: the Video is not shown in some places. Check this one instead.
http://www.youtube.com/watch?v=wOlTdkYXuzE
.
swimming in the stream of global consciousness
(Last updated on aug 30 2011)
Configuration of Red Hat Enterprise Linux Server 6.1 (Hardware: HP DL380G7, 2 CPU Intel core) connected with two 10Gbit/sec ethernet interfaces (HP NC522SFP Dual Port 10GbE Server Adapter Board), with interface bonding, high availability, bandwidth aggregation and multiple VLAN transport.
Two 10Gbit/s physical network interfaces have to be connected to two FEX (Nexus Fabric EXtension "switches") upstreaming to two different Nexus 7000 cores, in a high availability configuration, allowing also to use both links simultaneously, and to transport different VLANs.
The different VLANs have then to be mapped on different linux logical subinterfaces.
The two physical interface are joined to form a bond, called bond0.
A specific channel configuration exists on the cisco nexus switches, so to allow these ports to form a single trunk channel, and to transport on it tagged frames from the selected VLANs, complying to the 802.1q transport.
Here are the settings on the Cisco Nexus Side (only one "side" is shown, the other is symmetric):
Core to FEX2232
interface port-channel131
switchport
switchport mode fex-fabric
fex associate 131
mtu 9216
FEX to server
interface Ethernet131/1/5
description srv
switchport
switchport mode trunk
switchport trunk allowed vlan 10-13
flowcontrol send off
channel-group 88 mode active
no shutdown
-------
[root@srv network-scripts]# cat ifcfg-eth0
DEVICE=eth0
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HWADDR=78:e3:b5:f4:e0:50
TYPE=Ethernet
IPV6INIT=no
[root@srv network-scripts]# cat ifcfg-eth2
DEVICE=eth2
USERCTL=no
ONBOOT=yes
MASTER=bond0
SLAVE=yes
BOOTPROTO=none
HWADDR=78:E3:B5:F4:76:E0
TYPE=Ethernet
IPV6INIT=no
[root@srv network-scripts]# cat ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet
BONDING_OPTS="mode=4 miimon=100"
IPV6INIT=no
USERCTL=no
MTU=9000
[root@srv network-scripts]# cat ifcfg-bond0.10
IPADDR=192.168.145.248
NETMASK=255.255.254.0
DEVICE=bond0.10
ONBOOT=yes
VLAN=yes
TYPE=Ethernet
HWADDR=78:e3:b5:f4:e0:50
BOOTPROTO=none
GATEWAY=192.168.144.1
IPV6INIT=no
USERCTL=no
MTU=1500
[root@srv network-scripts]# cat ifcfg-bond0.11
IPADDR=192.168.148.85
NETMASK=255.255.255.0
DEVICE=bond0.11
ONBOOT=yes
VLAN=yes
TYPE=Ethernet
BOOTPROTO=none
IPV6INIT=no
USERCTL=no
MTU=9000
[root@srv network-scripts]# ifconfig eth0 && ifconfig eth2 && ifconfig bond0 && ifconfig bond0.10 && ifconfig bond0.11
eth0 Link encap:Ethernet HWaddr 78:E3:B5:F4:E0:50
UP BROADCAST RUNNING SLAVE MULTICAST MTU:9000 Metric:1
RX packets:30750 errors:0 dropped:0 overruns:0 frame:0
TX packets:12992 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3590043 (3.4 MiB) TX bytes:3577302 (3.4 MiB)
Interrupt:53
eth2 Link encap:Ethernet HWaddr 78:E3:B5:F4:E0:50
UP BROADCAST RUNNING SLAVE MULTICAST MTU:9000 Metric:1
RX packets:36472 errors:0 dropped:0 overruns:0 frame:0
TX packets:7248 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:27483898 (26.2 MiB) TX bytes:906669 (885.4 KiB)
Interrupt:61
bond0 Link encap:Ethernet HWaddr 78:E3:B5:F4:E0:50
inet6 addr: fe80::7ae3:b5ff:fef4:e050/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:9000 Metric:1
RX packets:67224 errors:0 dropped:0 overruns:0 frame:0
TX packets:20242 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:31074081 (29.6 MiB) TX bytes:4484967 (4.2 MiB)
bond0.10 Link encap:Ethernet HWaddr 78:E3:B5:F4:E0:50
inet addr:192.168.145.248 Bcast:192.168.145.255 Mask:255.255.254.0
inet6 addr: fe80::7ae3:b5ff:fef4:e050/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:51880 errors:0 dropped:0 overruns:0 frame:0
TX packets:13135 errors:0 dropped:10 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8963296 (8.5 MiB) TX bytes:3972360 (3.7 MiB)
bond0.11 Link encap:Ethernet HWaddr 78:E3:B5:F4:E0:50
inet addr:192.168.148.85 Bcast:192.168.148.255 Mask:255.255.255.0
inet6 addr: fe80::7ae3:b5ff:fef4:e050/64 Scope:Link
UP BROADCAST RUNNING MASTER MULTICAST MTU:9000 Metric:1
RX packets:14599 errors:0 dropped:0 overruns:0 frame:0
TX packets:6891 errors:0 dropped:7 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20770093 (19.8 MiB) TX bytes:486535 (475.1 KiB)
[root@srv network-scripts]# ethtool eth0
Settings for eth0:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: external
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000005 (5)
Link detected: yes
[root@srv network-scripts]# ethtool eth2
Settings for eth2:
Supported ports: [ FIBRE ]
Supported link modes: 10000baseT/Full
Supports auto-negotiation: No
Advertised link modes: 10000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: No
Speed: 10000Mb/s
Duplex: Full
Port: FIBRE
PHYAD: 0
Transceiver: external
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Current message level: 0x00000005 (5)
Link detected: yes
-------
[root@srv network-scripts]# nuttcp -t -v -T 60 192.168.148.85 nuttcp-t: v6.1.2: socket nuttcp-t: buflen=65536, nstream=1, port=5001 tcp -> 192.168.148.85 nuttcp-t: time limit = 60.00 seconds nuttcp-t: connect to 192.168.148.85 with mss=8948, RTT=0.277 ms nuttcp-t: send window size = 28440, receive window size = 87380 nuttcp-t: available send window = 21330, available receive window = 65535 nuttcp-t: 70086.0000 MB in 60.00 real seconds = 1196131.87 KB/sec = 9798.7123 Mbps nuttcp-t: retrans = 0 nuttcp-t: 1121376 I/O calls, msec/call = 0.05, calls/sec = 18689.56 nuttcp-t: 0.2user 29.7sys 1:00real 49% 0i+0d 468maxrss 0+2pf 25844+75csw nuttcp-r: v6.1.2: socket nuttcp-r: buflen=65536, nstream=1, port=5001 tcp nuttcp-r: accept from 192.168.148.86 nuttcp-r: send window size = 28440, receive window size = 87380 nuttcp-r: available send window = 21330, available receive window = 65535 nuttcp-r: 70086.0000 MB in 60.00 real seconds = 1196065.83 KB/sec = 9798.1712 Mbps nuttcp-r: 2319818 I/O calls, msec/call = 0.03, calls/sec = 38661.42 nuttcp-r: 0.4user 33.9sys 1:00real 57% 0i+0d 330maxrss 0+17pf 1103994+76csw [root@srv network-scripts]#
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu----- r b swpd free buff cache si so bi bo in cs us sy id wa st 0 0 0 15100956 44948 525388 0 0 0 0 280 152 0 0 100 0 0 0 0 0 15100956 44948 525388 0 0 0 0 159 73 0 0 100 0 0 1 0 0 15096676 44948 525388 0 0 0 0 44407 536 0 2 98 0 0 1 0 0 15097296 44956 525384 0 0 0 44 51087 455 0 6 94 0 0 1 0 0 15097792 44956 525388 0 0 0 0 51025 556 0 2 98 0 0 1 0 0 15098056 44956 525388 0 0 0 0 50067 656 0 7 93 0 0 1 0 0 15098304 44956 525388 0 0 0 0 49978 774 0 2 98 0 0 1 0 0 15098676 44956 525388 0 0 0 0 50264 769 0 6 94 0 0 1 0 0 15098676 44956 525388 0 0 0 1076 50428 843 0 2 98 0 0 1 0 0 15098676 44956 525388 0 0 0 0 50832 1202 0 5 95 0 0 0 0 0 15099296 44956 525388 0 0 0 0 51193 1350 0 2 98 0 0 1 0 0 15099544 44956 525388 0 0 0 0 51228 1198 0 7 93 0 0 0 0 0 15102948 44956 525388 0 0 0 0 6756 681 0 0 100 0 0 0 0 0 15103072 44964 525380 0 0 0 360 684 462 0 0 100 0 0 0 0 0 15103400 44964 525388 0 0 0 0 234 147 0 0 100 0 0
(text crossposted from ebmb)
I have been an avid reader: for many years.
Actually I grew up with books: reading, and dreaming.
![]() |
| Carl Spitzweg, the bookworm, 1850 |
| The London Holland-House library after blitz german bombings. Picture taken on oct 1, 1940. |
Where did Gandalf put his grey robes,
and his grey hat, after his fight with the Balrog?
Absolutes are easier to deal with than tradeoffs
But real beauty lies in between
In the nuances, in fractal dances
In chaotic indecisions, bouncing on spectre's ends
In misteriously misty shades of grey
In mutations, diversity, evolution
Be alive
Cast Doubt
Ready for change
Marco
(crossposted from ebmb)
.
ISO 11898-2 high speed
ISO 11898-2 is the most used physical layer standard for CAN networks. It describes the bus access unit (implemented as CAN high-speed transceiver) functions as well as some medium-dependent interface features.ISO 11898-3 (aka ISO 11519-2) defines the fault tolerant (and lower speed) CAN, up to 125Kbit/sec
In this standard the data rate is defined up to 1 Mbit/s with a theoretically possible bus length of 40 m at 1 Mbit/s. The high-speed standard specifies a two-wire differential bus whereby the number of nodes is limited by the electrical busload. The characteristic line impedance is 120 Ohm, the common mode voltage ranges from -2 V on CAN_L to +7 V on CAN_H. The nominal specific propagation delay of the two-wire bus line is specified at 5 ns/m. All these figures are valid only for a 1 Mbit/s transfer rate and a maximum network length of 40 m.
In order to achieve physical compatibility all nodes in the network must use the same or a similar bit-timing. For automotive applications the SAE published the SAE J2284 specification. For industrial and other non-automotive applications the system designer may use the CiA 102 recommendation. This specification defines the bit-timing for rates of 10 kbit/s to 1 Mbit/s. It also provides recommendations for bus lines and for connectors and pin assignment.
ISO 11898-3 fault-tolerant
An alternative form of bus interfacing and arrangement of bus lines is specified in ISO 11898-3 (fault-tolerant CAN). This standard is mainly used for body electronics in the automotive industry. Since for this specification a short network was assumed, the problem of signal reflection is not as important as for long bus lines. This makes the use of an open bus line possible.
This means low bus drivers can be used for networks with very low power consumption and the bus topology is no longer limited to a linear structure. It is possible to transmit data asymmetrically over just one bus line in case of an electrical failure of one of the bus lines.
ISO 11898-3 defines data rates up to 125 kbit/s with the maximum bus length depending on the data rate used and the busload. Up to 32 nodes per network are specified. The common mode voltage ranges between -2 V and +7 V. The power supply is defined at 5 V.
Transceiver chips, which support this standard, are available from several companies. The fault-tolerant transceivers support the complete error management including the detection of bus errors and automatic switching to asymmetrical signal transmission.
| Signal | recessive state | dominant state | unit | ||||
| min | nominal | max | min | nominal | max | ||
| CAN-High | 2.0 | 2.5 | 3.0 | 2.75 | 3.5 | 4.5 | Volt |
| CAN-Low | 2.0 | 2.5 | 3.0 | 0.5 | 1.5 | 2.25 | Volt |
| Signal | recessive state | dominant state | unit | ||||
| min | nominal | max | min | nominal | max | ||
| CAN-High | 1.6 | 1.75 | 1.9 | 3.85 | 4.0 | 5.0 | Volt |
| CAN-Low | 3.1 | 3.25 | 3.4 | 0 | 1.0 | 1.15 | Volt |
| Bus length (metres) | Maximum bit rate (bit/s) |
| 40 | 1 Mbit/s |
| 100 | 500 kbit/s |
| 200 | 250 kpit/s |
| 500 | 125 kbit/s |
| 6 km | 10 kbit/s |
"This SAE Recommended Practice provides the framework to allow reprogramming software applications from all vehicle manufacturers the flexibility to work with multiple vehicle data link interface tools from multiple tool suppliers. This system enables each vehicle manufacturer to control the programming sequence for electronic control units (ECU's) in their vehicles, but allows a single set of programming hardware and vehicle interface to be used to program modules for all vehicle manufacturers. This document does not limit the hardware possibilities for the connection between the PC used for the software application and the tool (e.g., RS-232, RS-485, USB, Ethernet...). Tool suppliers are free to choose the hardware interface appropriate for their tool. The goal of this document is to ensure that reprogramming software from any vehicle manufacturer is compatible with hardware supplied by any tool manufacturer. The U.S. Environmental Protection Agency (EPA) and the California Air Resources Board (ARB) have proposed requirements for reprogramming vehicles for all manufacturers by the aftermarket repair industry. This document is intended to meet those proposed requirements for 2004 model year vehicles. Additional requirements for the 2005 model year may require revision of this document, most notably the inclusion of SAE J1939 for some heavy-duty vehicles. This document will be reviewed for possible revision after those regulations are finalized and requirements are better understood. Possible revisions include SAE J1939 specific software and an alternate vehicle connector, but the basic hardware of an SAE J2534 interface device is expected to remain unchanged."Check also this article by Dan DeMaggio from Drew Technologies: http://www.drewtech.com/support/j2534/intro.html for the story of the development of this SAE recommendation.
The role of the Gateway (also known as the Data bus diagnostic interface J533) is the exchange of data between the CAN data bus systems (‘powertrain CAN data bus’, ‘convenience CAN data bus’ and ‘infotainment CAN data bus’) and the conversion of diagnostic data from CAN data bus systems to K-cable and vice versa so the data can be used by vehicle diagnosis, testing and information systems like the dealer VAS tools and Vagcom/VCDS.Here is a picture of the Volkswagen/Audi gateway (part no: 1K0907530AA), taken from http://www.my-gti.com/1101
For various reasons including power drain issues with third generation head units or the addition of new unsupported modules the CAN bus gateway must be upgraded to a newer revision. This guide covers the replacement of the CAN bus gateway in a 2005 MY06 Volkswagen Golf GTI. The upgrade replaces the 1K0 907 530 E (1K0907530E) with a 1K0 907 530 AA (1K0907530AA).
| Pin | SAE J1979, ISO 15031 | GM | Fiat | Opel | Saab | Isuzu | GM-LAN since 5.2002 |
|---|---|---|---|---|---|---|---|
| 1 | Manufacturer mandated | second UART | ABS, Brakes, K-Line | reserved | Saab Instruments (+) | SIR (GM8192 Prot.) | SW-LS-CAN (33kB) or DW-FT-CAN (+) (<125kB) |
| 2 | J1850 (+) PWM/VPW | J1850(+) VPW | DW-FT-CAN(+) | n/a | n/a | n/a | n/a |
| 3 | Manufacturer mandated | Comfort | Airbag | K-Line, K2, TCM, Sunroof, CDL, Multi-Timer | n/a | ABS (KW81-Prot.) | MS-CAN (+) (95kB) |
| 4 | Chassis ground | Chassis ground | Chassis ground | Chassis ground | Chassis ground | Chassis ground | Chassis ground |
| 5 | Signal ground | Signal ground | Signal ground | Signal ground | Signal ground | Signal ground | Signal ground |
| 6 | ISO 15765 HS-CAN (+) | PCM | ISO 15765 HS-CAN(+) | Blinkcode | Blinkcode | TCM | ISO 15765 HS-CAN (+) (500kB) |
| 7 | ISO 9141 K-Line | n/a | ISO 9141 K-Line (engine) | K-Line, K1 (engine) | K-Line, K1 (engine) | K-Linie, K1 (engine) | n/a |
| 8 | Manufacturer mandated | CCM | n/a | K-Line, K4 | K-Line (Saab 9000/1, KW81/82 Prot.) | n/a | reserved |
| 9 | Manufacturer mandated | first UART | Body ECU | reserviert | Saab Instruments (-) | ECM/TCM (GM8192 Prot.) | DW-FT-CAN (-) (<125kB) |
| 10 | J1850 (-) PWM | n/a | DW-FT-CAN (-) | n/a | n/a | n/a | n/a |
| 11 | Manufacturer mandated | EVA Controller | (Anti-Theft system) | reserved | L-Line Memory Seats | SIR | MS-CAN (-) (95kB) |
| 12 | Manufacturer mandated | ABS | engine compartment | K-Line, K3, ABS, TC, Steering, RTD, OW | n/a | ABS | K-Line (KW82 Prot.) |
| 13 | Manufacturer mandated | SIR | Luggage compartment | reserved f. K-Line, K5 | n/a | ECM | reserved |
| 14 | ISO 15765 HS-CAN (-) | E&C | ISO 15765 HS-CAN (-) | reserved | n/a | n/a | ISO 15765 HS-CAN (-) (500kB) |
| 15 | ISO 9141 L-Line | n/a | n/a | n/a | n/a | n/a | n/a |
| 16 | Battery Plus, unswitched | Battery Plus, unswitched | Battery Plus, unswitched | Battery Plus, unswitched | Battery Plus, unswitched | Battery Plus, unswitched | Battery Plus, unswitched |
An unshielded two-wire line (1) and (2) with a cross section of 0.35 mm² or 0.5 mm² is used for CAN bus wiring.On FIAT punto diesel, we found a CAN signal in the connector behind the radio. The CAN wires in this car are pink-black and pink-white.
The colour codes of the CAN bus wiring are:
Powertrain CAN high wire Orange/black
Convenience CAN high wire Orange/green
Infotainment CAN high Orange/violet
CAN low wire, (all) Orange/brown
But this impossibility is normally not due to physical reasons. Each ECU manufacturer uses its own set of rules & codes to craft data packets on their vehicles networks. These informations and data formats are not readily available, and there are no shared rules followed by different manufacturers.
Fm4200 is designed to be able to decode FMS CAN, which is a standard data format representation accepted and shared by all industrial vehicles (trucks). The target is to allow tachometer interconnect with vehicle dashboard.
Tachometers are devices that in many countries MUST be installed on trucks so to monitor driver behavior and work activities. Since there are many tachometer devices, which are built and installed by many countries certified suppliers, a standard was needed, so FMS was born. Non-professional access to tachometer data connection is generally prohibited.
Thru car databus reverse engineering techniques, mostly based on trial and error and/or leaked informations, it is theoretically possible to map some of the CAN data packets to their meanings. Generally read only approach is safe. But problems could arise when vehicle software maintenance is performed, because data packet meaning could change, and current manufacturers are not expected to openly disclose these details.
Write access to the drivetrain and engine bus is to be considered critical and is generally explicitely forbidden or strongly not recommended.
For sure it could be great if all the data was understandable and accessible, but there are important security implications if people irresponsibly tamper with these things. Vehicle security, insurance coverage and road safety could be impacted.
So, be careful and play always on the safe side.
My suggestion is to NEVER connect untrusted devices, unknown or potentially unreliable closed source software to critical systems.
Always study, learn and understand before playing. And always share responsibly your discoveries.
Best,
Marco