Search This Blog

Showing posts with label nwdiag. Show all posts
Showing posts with label nwdiag. Show all posts

Monday, April 15, 2013

Howto generate simple network diagrams

A picture is worth more than 1000 words one of the proverbs says. This is absolute truth when you  troubleshoot and need to understand a customer network environmental  Below is a very simple recipe (unfortunately) how to generate a network diagram with a tool called nwdiag.

Instalation
 
aptitude install python-dev
pip install nwdiag

# will generate a png file diag1.png
nwdiag  diag1.conf

Example 1: FW with one segment
 
{
  public [shape = cloud];
  public -- firewall;

  network inside {
      address = "192.168.100.x/24"

      firewall [address = "192.168.100.1"];
      web01 [address = ".11"];
      cachesrv [address = ".51"];
      db1 [address = ".101"];
  }
}

Example 2: FW with dmz and inside segment
 
{
  public [shape = cloud];
  public -- firewall;

  network dmz {
      address = "192.168.200.x/24";

      firewall [address = "192.168.200.1"];
      web01 [address = ".11"];
      cachesrv [address = ".51"];
  }
  network inside {
      address = "192.168.100.x/24"

      firewall [address = "192.168.100.1"];
      db1 [address = ".101"];
  }
}