On both wired and wireless connections, I can only access one of 192.168.1.1 (the router web portal) and the general Internet.  Which "mode" my devices are in is seemingly random.  This has persisted so far for 5 days (since I began using this network).

When connected to the Internet, I can go to 192.168.102.1 and I see a landing page for "mikrotik routeros", but I cannot go to 192.168.1.1. When connected to the router but not the Internet, 192.168.1.1 yields the router web portal, and 192.168.102.1 is inaccessible.

Attempted solutions


Upgrading router firmware  
Resetting router to factory settings  
Rebooting devices  
Fiddling with router settings (changing wireless security modes, removing wireless security, etc)  
Upgrading wireless drivers on computers  


Some data


Affects BlackBerry, Windows, Android and Ubuntu devices
All devices work properly on other networks
Devices may switch modes if they have been offline for a long time (eg: overnight), but restarting a device has no effect
Router is TP-Link TL-WR740N v4
Router firmware DD-WRT v24-sp2 (04/18/14) std - build 23919
Both wired and wireless connections are affected, but not necessarily simultaneously


I don't know anything about networking, but here's some info that seems helpful taken from my Ubuntu laptop.

With internet access (wired in this case, but it varies):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.102.1   0.0.0.0         UG    0      0        0 eth0
192.168.102.0   0.0.0.0         255.255.254.0   U     1      0        0 eth0

~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:ee:75:0c:02:80  
          inet addr:192.168.103.232  Bcast:192.168.103.255  Mask:255.255.254.0
          inet6 addr: fe80::56ee:75ff:fe0c:280/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3273 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3035 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2276482 (2.2 MB)  TX bytes:517732 (517.7 KB)
          Interrupt:20 Memory:f0500000-f0520000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4315 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4315 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:342880 (342.8 KB)  TX bytes:342880 (342.8 KB)


With "router access" (wireless in this case, but it varies):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 wlan0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0

~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr 54:ee:75:0c:02:80  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:9422 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7545 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6216683 (6.2 MB)  TX bytes:1399280 (1.3 MB)
          Interrupt:20 Memory:f0500000-f0520000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4446 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4446 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:353415 (353.4 KB)  TX bytes:353415 (353.4 KB)

wlan0     Link encap:Ethernet  HWaddr e8:2a:ea:60:31:4b  
          inet addr:192.168.1.105  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ea2a:eaff:fe60:314b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:77013 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49506 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:25275438 (25.2 MB)  TX bytes:30355132 (30.3 MB)


With both (wired with wireless turned on):

~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.102.1   0.0.0.0         UG    0      0        0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U     9      0        0 wlan0
192.168.102.0   0.0.0.0         255.255.254.0   U     1      0        0 eth0



Question: How can I draw these pictures with TikZ?
Answer: A specialised tree-drawing library or package would make this task much easier and allow you to specify the tree much more concisely. Various options are available e.g. qtree (non-TikZ), tikz-qtree (like qtree but in TikZ), forest (based on TikZ) etc.

forest is the most powerful and probably the best choice here. (But I am biased.)

\usepackage{forest}


For convenience, we set up 2 styles for the edges: my edge is the basic style with an arrow; 0 my edge is a dashed variant of my edge. We define these with \tikzset making them available both when customising the style of the BDT diagram and when tweaking it for the BDD version.

\usetikzlibrary{arrows.meta}
\tikzset{
  0 my edge/.style={densely dashed, my edge},
  my edge/.style={-{Stealth[]}},
}


We now set up a style suitable for drawing BDTs of the kind shown:

\forestset{
  BDT/.style={
    for tree={
      if n children=0{}{circle},% use a circle unless there are 0 children
      draw,% draw every node
      edge={
        my edge,% use the my edge style for edges (with the arrow)
      },
      if n=1{
        edge+={0 my edge},% if the child is the first one, add the 0 my edge style (dashed)
      }{},
      font=\sffamily,% use sans serif for node text
    }
  },
}


The BDT is then straightforward:

\begin{forest}
  BDT
  [a
    [b
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
    ]
    [b
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
      [c
        [d
          [1]
          [1]
        ]
        [d
          [1]
          [1]
        ]
      ]
    ]
  ]
\end{forest}




For instructions explaining how to specify a tree in bracket notation see my explanation in this answer.

The BDD is a bit more complex and I'm not sure if I understand what is essential to the diagram and what not. Some arrows are curved, for example, but some not and I'm not always sure why.

To ensure consistency, we use the BDT style and then use two methods to tweak the code:


,phantom makes a node a 'phantom' node which affects how other nodes are spaced without being visible itself. We use these for the 'missing' nodes.
tikz={} allows you to specify TikZ code which will be run after the rest of the tree is drawn. We can use this for the arrows which skip levels. We can specify the current node using (). The other node can either be named using name= - as in the case of my one in the code below - or be specified relative to the current node by using a ! node name. In this case, we use !l1 to specify the current-node's-last-child's-first-child when drawing the arrows from a and c.


Then we can write:

\begin{forest}
  BDT
  [a, tikz={\draw [0 my edge] () [bend right] to (!l1.north) ;}
    [,phantom]
    [b, tikz={\draw [my edge] () [bend left] to (my one.north) ;}
      [c, tikz={\draw [0 my edge] () [bend right] to (!l1.north) ;}
        [,phantom]
        [d
          [0]
          [1, name=my one]
        ]
      ]
      [,phantom]
    ]
  ]
\end{forest}




If you need the line from b to be a straight vertical drop, you can adjust the tree but it is a little more complex. Since the other 'skipping' arrows are curved, I don't do this as there's no obvious reason to think it necessary.

Complete code:

\documentclass[tikz,multi,border=10pt]{standalone}
\usepackage{forest}
\usetikzlibrary{arrows.meta}
\tikzset{
  0 my edge/.style={densely dashed, my edge},
  my edge/.style={-{Stealth[]}},
}
\forestset{
  BDT/.style={
    for tree={
      if n children=0{}{circle},
      draw,
      edge={
        my edge,
      },
      if n=1{
        edge+={0 my edge},
      }{},
      font=\sffamily,
    }
  },
}
\begin{document}
\begin{forest}
  BDT
  [a, tikz={\draw [0 my edge] () [bend right] to (!l1.north) ;}
    [,phantom]
    [b, tikz={\draw [my edge] () [bend left] to (my one.north) ;}
      [c, tikz={\draw [0 my edge] () [bend right] to (!l1.north) ;}
        [,phantom]
        [d
          [0]
          [1, name=my one]
        ]
      ]
      [,phantom]
    ]
  ]
\end{forest}
\begin{forest}
  BDT
  [a
    [b
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
    ]
    [b
      [c
        [d
          [0]
          [0]
        ]
        [d
          [0]
          [1]
        ]
      ]
      [c
        [d
          [1]
          [1]
        ]
        [d
          [1]
          [1]
        ]
      ]
    ]
  ]
\end{forest}
\end{document}