Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Hex dump into Wireshark or similiar Post 302880913 by mutley2202 on Tuesday 24th of December 2013 01:30:34 PM
Old 12-24-2013
Hex dump into Wireshark or similiar

Hi Guy's I am trying to find a way of importing the raw hex data from a router dump into a wireshark trace for example. I have had a look at the text2pcap pages and cant seem to work it out.

Does anyone have any expierence in this ? If it requires format changes whats the best way of doing this script wise ?

I have included a PDU Hex dump below,

Code:
0x0000  30ff 018c 83ad 009e 4548 018c 235b 0000 0.......EH..#[..
0x0010  f411 bea4 d534 8afa 0a10 78da 01f4 d718 .....4....x.....
0x0020  0178 57ae 45e3 363b 406b 2969 0b44 2317 .xW.E.6;@k)i.D#.
0x0030  7957 d3f8 0110 0400 0000 0000 0000 0170 yW.............p
0x0040  0400 0038 0000 0001 0000 0001 0000 002c ...8...........,
0x0050  0101 0001 0000 0024 0a01 0000 8001 0005 .......$........
0x0060  8002 0001 8004 0002 8003 fde9 800b 0001 ................
0x0070  000c 0004 0020 c49b 0a00 0084 3770 d1fa ............7p..
0x0080  8b41 d1cd 4a5f fff3 b564 7d27 d84c 3845 .A..J_...d}'.L8E
0x0090  8858 57b4 5b90 a0d1 6bc3 22e1 7f69 23f6 .XW.[...k."..i#.
0x00a0  9620 11a4 f406 6672 ad07 3d32 ca60 129a ......fr..=2.`..
0x00b0  a2de 4209 8d36 934c e84b c2da 0e7f 79b3 ..B..6.L.K....y.
0x00c0  d1db 3cee 1509 e1cb 46d8 f350 acdc 40ec ..<.....F..P..@.
0x00d0  0a7e b655 09f5 0cce 7aa9 70df e470 5b8a .~.U....z.p..p[.
0x00e0  cb75 72ca 1c51 fda1 d2a5 cc2b 8d58 ee07 .ur..Q.....+.X..
0x00f0  74de 0490 d05f fa03 a975 5c21 0500 0018 t...._...u\!....
0x0100  4f19 116e 41a7 2848 fe9a 8964 e281 d47c O..nA.(H...d...|
0x0110  805a 15e8 0800 000c 0111 01f4 d534 8afa .Z...........4..
0x0120  0d00 0014 e4da e267 8a5d cc43 82ab 9fd2 .......g.].C....
0x0130  98a0 8d1b 0d00 0014 12f5 f28c 4571 68a9 ............Eqh.
0x0140  702d 9fe2 74cc 0100 0d00 000c 0900 2689 p-..t.........&.
0x0150  dfd6 b712 0d00 0014 afca d713 68a1 f1c9 ............h...
0x0160  6b86 96fc 7757 0100 0d00 0018 4048 b7d5 k...wW......@H..
0x0170  6ebc e885 25e7 de7f 00d6 c2d3 c000 0000 n...%...........
0x0180  0000 0014 1f07 f70e aa65 14d3 b0fa 9654 .........e.....T
0x0190  2a50 0100                               *P..


Thanks in advance and Merry Christmas to you all.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

help, what is the difference between core dump and panic dump?

help, what is the difference between core dump and panic dump? (1 Reply)
Discussion started by: aileen
1 Replies

2. UNIX for Dummies Questions & Answers

Similiar to active directory in Unix?

Hi all, If Windows server have an active directory and active folder/mapping(maybe in unix NFS). Is there any similiar fuctions in unix. Actually if we have a hundred client in unix/linux with unix server, I want to manage user client and access control easier as in windows. Thank you in... (5 Replies)
Discussion started by: blesets
5 Replies

3. UNIX for Advanced & Expert Users

converting openssl hex dump or PEM format to integer array

Hello. I'm working on a project that involves creating public/private keys server-side using openssl and using the public key in a Javascript application to encrypt sensitive data in form fields before transmission to the server. Using an SSL https server connection was not an option in this... (1 Reply)
Discussion started by: jhopper
1 Replies

4. UNIX for Dummies Questions & Answers

how do i compare and extract similiar data

I have 2 files. The first file contains user names in one column. The second, and considerably longer, file contains user names in the first column and corresponding full names in the second column. Currently these are in the .xls format. I'd like to be able to compare file1 with file2 and extract... (2 Replies)
Discussion started by: raptrmastr
2 Replies

5. Programming

After converting the hexstr to Hex and storing the Hex in a char*

Hi All, My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ',' This has to be done for all the hexstring char* is NULL. Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies

6. AIX

Whar is hex dump utility and how to insert 1C?

What is the hexdump utility on AIX box. Also I want to insert hex 1C using vi editor how to do that. Thanks. :) (2 Replies)
Discussion started by: ekb
2 Replies

7. Programming

What is the difference between ios::hex and std::hex?

Hi, Is there really a difference between these two, std::hex and ios::hex?? I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true? Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies

8. Shell Programming and Scripting

File processing - have to get the count of similiar types

Input File: c_id=india ---some data-- c_id=US --some data--- c_id=UK --some data-- c_id=india --some data-- c_id=india --some data-- c_id=Russia --some data-- c_id=UK --some data-- c_id=US --some data-- c_id=Africa --some data (5 Replies)
Discussion started by: karumudi7
5 Replies

9. Shell Programming and Scripting

Need a perl script similiar to grep -r 'word' /path/to/dir"

Hi , i am looking for a perl script to grep for a string in all files inside a directory . bash command . grep -r 'word' /path/to/dir Thanks, Nvil (3 Replies)
Discussion started by: nevil
3 Replies

10. Shell Programming and Scripting

Help with print if two columns is somehow similiar

Input File: GO:0009437,GO:0006355,GO:0006351 GO:0009437 GO:0006777,GO:0032324 GO:0035433,GO:0015992,GO:0071422 GO:0009082,GO:0009097,GO:0006566 GO:0009082,GO:0006351 GO:0000160,GO:0045893,GO:0006351 GO:0006071,GO:0045892,GO:0006351 GO:0009244 GO:0009244 GO:0046417,GO:0009094,GO:0006571... (12 Replies)
Discussion started by: perl_beginner
12 Replies
CIDR(7) 						 Miscellaneous Information Manual						   CIDR(7)

NAME
CIDR, cidr - Classless Inter-Domain Routing DESCRIPTION
Classless Inter-Domain Routing, also known as CIDR, is an Internet addressing architecture designed to solve two problems: the growth in the size of the routing tables in the top-level routers and the exhaustion of Class B address space. To solve these problems, CIDR relies on a new means of distributing the allocation of Internet address space and on a concept known as route aggregation. For an up-to-date list of Frequently Asked Questions (FAQ) about CIDR, retrieve the CIDR FAQ from either of the following locations: http://www.rain.net/faqs/cidr.faq.html http://www.ibm.net.il/~hank/cidr.html Address Space Allocation The traditional 32-bit Internet address is divided into a network part and a host part. The size of each part depends on the network class to which the address belongs. The following table shows the sizes of each part for Class A, Class B, and Class C networks. ----------------------------------------------------------------------- Network Size of Network Part (in bits) Size of Host Part (in bits) ----------------------------------------------------------------------- Class A 8 24 Class B 16 16 Class C 24 8 ----------------------------------------------------------------------- In this scenario, each physical network or LAN uses a single network number. While the idea seems sound, most organizations seldom create a single network containing thousands of hosts, choosing instead to divide their networks using routers. For organizations with Class B addresses, this wastes valuable addresses. To cope with the various network topologies, the concept of subnetworks or subnetting emerged. In a subnet, the network part of the address consists of the network part and a portion of the host part. The bitmask convering these two parts is called the subnet mask. The area of the host part that is covered by the subnet mask identifies the subnet. This process allows you to identify individual LANS by their subnet number within the larger network number. The only way to communicate between two or more subnets is through a router. Currently, routers make routing decisions by extracting the network portion of an IP address and looking it up in their routing table. This forces some IP routers to store each network number connected to the Internet in their routing table. For many organizations, a Class C network (254 hosts) is too small, whereas a Class B network (65534 hosts) is too large, resulting in poor address space utilization. Route Aggregation The Internet Advisory Board (IAB) and Internet Engineering Task Force (IETF) have decided to eliminate the notion of IP address classes and to direct routers to make routing decisions based on a variable-length, contiguous IP address prefix. This is what is meant by classless routing. Under this scenario, an Internet Service Provider (ISP) that had previously announced 256 contiguous Class C networks to the Internet, now only has to announce a single prefix, with 16 significant bits, for all these networks. This prefix is referred to as an aggregate, and the network is referred to as a supernet. If the ISP needed to add additional customers to its network, it could do so without modifying the routing announcements to the rest of the Internet. Aggregating networks reduces the number of routers in a network and enables you to make optimum use of bridges and high-speed switches. EXAMPLES
This section describes one example of a Class C supernet. If organization A requires 1000 addresses, it might have the following Class C networks: 212.221.32.0, 212.221.33.0, 212.221.34.0, and 212.221.35.0. Using current Class C addressing specifications, organization A's network mask and network numbers are as follows: /------------24 bits----------- 1111 1111 1111 1111 1111 1111 0000 0000 = mask 255.255.255.0 1101 0100 1101 1101 0010 0000 0000 0000 = network 212.221.32.0 1101 0100 1101 1101 0010 0001 0000 0000 = network 212.221.33.0 1101 0100 1101 1101 0010 0010 0000 0000 = network 212.221.34.0 1101 0100 1101 1101 0010 0011 0000 0000 = network 212.221.35.0 --------network address-------/ --host--/ address Typically, software compares all network address bits that are covered by the network mask (1 bits) to determine the effective network address. Because the network addresses covered by the 24-bit network mask are different, traffic from one network to another requires a router. In addition, routes to each of the four networks are advertised to the rest of the Inter- net, and occupy space in the routers' routing tables. Under CIDR rules, organization A could shorten their network mask from 24 bits under current rules to 22 bits. The result is a network mask of 255.255.252.0, as follows: /-----------22 bits---------- 1111 1111 1111 1111 1111 1100 0000 0000 = mask 255.255.252.0 1101 0100 1101 1101 0010 0000 0000 0000 = network 212.221.32.0 1101 0100 1101 1101 0010 0001 0000 0000 = network 212.221.33.0 1101 0100 1101 1101 0010 0010 0000 0000 = network 212.221.34.0 1101 0100 1101 1101 0010 0011 0000 0000 = network 212.221.35.0 1101 0100 1101 1101 0010 0011 0000 0000 = network 212.221.35.0 -------network address------/----host----/ address Because the network addresses covered by the 22-bit network mask are the same, traffic from one network to another does not require a router. Instead, the software uses Address Resolution Protocol (ARP) to acquire direct connection to the network. The address 212.221.32.0 with the mask 255.255.252.0 identifies all networks belonging to organization A. Expressed in CIDR format, orga- nization A's network address is 212.221.32.0/22. This effectively aggregates all routes under one network address. This also means that only one route is advertised to the rest of the Internet. If a router sees traffic addressed to 212.221.33.5 with the netmask of 255.255.252.0, the traffic is addressed to network 212.221.32.0. Using a network mask of 255.255.252.0, organization A can have a single bridged network of 1022 hosts (hosts 0 and 1024 are reserved for the broadcast address). Using a network mask of 255.255.254.0, organization A can have two bridged networks of 510 hosts (host 0 and 512 are reserved for the broadcast address). These techniques are not currently implemented in all host software, and should be implemented in networks with great care. However, the IETF suggests that host software be modified to allow for classless routing. RELATED INFORMATION
Commands: netstat(1), ifconfig(8), route(8). RFC1517, Applicability Statement for the Implementation of Classless Inter-Domain Routing (CIDR) RFC1518, An Architecture for IP Address Allocation with CIDR RFC1519, CIDR Address Strategy RFC1520, Exchanging Routing Information Across Provider Boundaries in the CIDR Environment delim off CIDR(7)
All times are GMT -4. The time now is 10:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy